2.9.1.5. memory_NewVariable()

[<<<] [>>>]

This function should be used whenever a new variable is to be allocated. The function returns a pointer to a FixSizeMemoryObject structure that holds the variable information and pointer to the memory that stores the actual value for the memory.

If there is not engough memory or the calling is illegal the returned value is NULL

pFixSizeMemoryObject memory_NewVariable(pMemoryObject pMo,
                                        int type,
                                        unsigned long LargeBlockSize
  ){

The second argument gives the type of the memory object to be allocated. If this value is LARGE_BLOCK_TYPE then the third argument is used to determine the size of the memory to be allocated. If the type if NOT LARGE_BLOCK_TYPE then this argument is ignored and the proper size is allocated.

If the type has memory that was earlier allocated and released it is stored in a free list and is reused.


[<<<] [>>>]