CCRTAllocator Class
This class provides methods for managing memory using CRT memory routines.
class ATL::CCRTAllocator
Name | Description |
---|---|
CCRTAllocator::Allocate | (Static) Call this method to allocate memory. |
CCRTAllocator::Free | (Static) Call this method to free memory. |
CCRTAllocator::Reallocate | (Static) Call this method to reallocate memory. |
This class is used by CHeapPtr to provide the CRT memory allocation routines. The counterpart class, CComAllocator, provides the same methods using COM routines.
Header: atlcore.h
Call this static function to allocate memory.
static __declspec(allocator) void* Allocate(size_t nBytes) throw();
nBytes
The number of bytes to allocate.
Returns a void pointer to the allocated space, or NULL if there is insufficient memory available.
Allocates memory. See malloc for more details.
Call this static function to free memory.
static void Free(void* p) throw();
p
Pointer to the allocated memory.
Frees the allocated memory. See free for more details.
Call this static function to reallocate memory.
static __declspec(allocator) void* Reallocate(void* p, size_t nBytes) throw();
p
Pointer to the allocated memory.
nBytes
The number of bytes to reallocate.
Returns a void pointer to the allocated space, or NULL if there is insufficient memory.
Resizes the amount of allocated memory. See realloc for more details.