Specified as a template argument of a container class (smplbuf
, smplque
) to allocate or specify an area of memory to be used internally.
This class is not called directly from user code, but is used internally to declare containers.
Class Name | Contents |
---|---|
In alloc_attach
and alloc_heap
, initialization methods (init_???()
) must be executed according to the memory allocation class.
Initialize with buffer p
and size n
.
Returns the size of the buffer.
This method is used to generate a compile error, like static_assert
, for a method call description that is different from the expected alloc class.
alloc_attach<T>
specify an already existing buffer
alloc_local<T, int N>
statically allocate a buffer of N bytes internally
alloc_heap<T>
allocate a buffer of the specified size in the heap