Keywords: allocator, aligned space, template class

# aligned_space Template Class

## Summary

Uninitialized memory space for an array of a given type.

## Syntax

    template<typename T, size_t N> class aligned_space;

## Header

    #include "tbb/aligned_space.h"

## Description

An `aligned_space` occupies enough memory and is sufficiently aligned to hold an array `T[N]`. The client is responsible for initializing or destroying the objects. An `aligned_space` is typically used as a local variable or field in scenarios where a block of fixed-length uninitialized memory is needed.

## Members

            namespace tbb {
            template<typename T, size_t N>
            class aligned_space {
            public:
                aligned_space();
                ~aligned_space();
                T* begin();
                T* end();
            };
        }

The following table provides additional information on the members of this template class.
Member | Description
--- | ---
aligned_space() | No effect. Does not invoke constructors.
~aligned_space() | No effect. Does not invoke constructors.
T* begin() | Returns: Pointer to beginning of storage.
T* end() | Returns: `begin()+N`

Parent topic: Memory Allocation