Method | ||
---|---|---|
void ASfree(void* ptr)
Frees the specified memory block.
|
||
void* ASmalloc(os_size_t nBytes)
Allocates and returns a pointer to a memory block containing the specified number of bytes.
|
||
void* ASrealloc(void* ptr, os_size_t newNBytes)
If possible, extends the given block and simply returns ptr. Otherwise, it allocates a new block of newNBytes bytes, copies the contents from the old pointer into the new block, frees the old pointer, and returns the pointer to the new block. If a new block cannot be allocated, the call fails and ptr is not freed. Reallocating a block to a smaller size will never fail.
|
ASfree | () |
Product availability: All |
Platform availability: All |
void ASfree(void* ptr)
Frees the specified memory block.
Parameters
ptr — | IN/OUT The block of memory to free. |
See Also
Since
File: ASProcs.h |
Line: 115 |
ASmalloc | () |
Product availability: All |
Platform availability: All |
void* ASmalloc(os_size_t nBytes)
Allocates and returns a pointer to a memory block containing the specified number of bytes.
Parameters
nBytes — | IN/OUT The number of bytes for which space is allocated. |
A pointer to the allocated memory, |
See Also
Since
File: ASProcs.h |
Line: 86 |
ASrealloc | () |
Product availability: All |
Platform availability: All |
void* ASrealloc(void* ptr, os_size_t newNBytes)
If possible, extends the given block and simply returns ptr
. Otherwise, it allocates a new block of newNBytes
bytes, copies the contents from the old pointer into the new block, frees the old pointer, and returns the pointer to the new block. If a new block cannot be allocated, the call fails and ptr
is not freed. Reallocating a block to a smaller size will never fail.
Parameters
ptr — | IN/OUT The existing memory block. |
|
newNBytes — | IN/OUT The number of bytes the memory block must be able to hold. |
A pointer to memory block. |
See Also
Since
File: ASProcs.h |
Line: 105 |