Sack Library Documentation
ContentsIndexReferenceHome
PreviousUpNext
sack::memory::HeapPreallocateEx Function
C++
MEM_PROC POINTER MEM_API HeapPreallocateEx(PMEM pHeap, POINTER source, PTRSZVAL size DBG_PASS);
#define HeapPreallocate(heap,p,sz) HeapPreallocateEx( (heap),(p),(sz) DBG_SRC )
MEM_PROC POINTER MEM_API PreallocateEx(POINTER source, PTRSZVAL size DBG_PASS);
Parameters 
Description 
PMEM pHeap 
If NULL or not specified, uses the common memory heap. 
POINTER source 
pointer to the block to pre-allocate. If NULL, a new memory block will be allocated that is filled with 0. 
size 
the new size of the block. 

A pointer to a new block of memory that is the new size.

This can be used to add additional space before the beginning of a memory block.

If the size specified for the new block is larger than the previous size of the block, the content data is copied to the end of the new block, and the memory leading up to the block is cleared to 0. 

If the size specified for the new block is smaller than the previous size, the end of the original block is not copied to the new block. 

If NULL is passed as the source block, then a new block filled with 0 is created.

Created with a commercial version of Doc-O-Matic. In order to make this message disappear you need to register this software. If you have problems registering this software please contact us at support@toolsfactory.com.
Copyright (c) 2000+. All rights reserved.
What do you think about this topic? Send feedback!