alloc
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 |
---|---|
| specify an already existing buffer |
| statically allocate a buffer of N bytes internally |
| allocate a buffer of the specified size in the heap |
In alloc_attach
and alloc_heap
, initialization methods (init_???()
) must be executed according to the memory allocation class.
initialization
Initialize with buffer p
and size n
.
Methods
alloc_size()
Returns the size of the buffer.
_is_attach(), _is_local(), _is_heap()
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.
最終更新