void
ASfree(
void
*
ptr
);
ptr | IN/OUT The block of memory to free.
|
void
ASfree(
void
*
ptr
);
ptr | IN/OUT The block of memory to free.
|
void
*
ASmalloc(
os_size_t
nBytes
);
nBytes | IN/OUT The number of bytes for which space is allocated.
|
NULL
on failure. void
*
ASmalloc(
os_size_t
nBytes
);
nBytes | IN/OUT The number of bytes for which space is allocated.
|
NULL
on failure. 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. void
*
ASrealloc(
void
*
ptr
,
os_size_t
newNBytes
);
ptr | IN/OUT The existing memory block.
|
newNBytes | IN/OUT The number of bytes the memory block must be able to hold.
|
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. void
*
ASrealloc(
void
*
ptr
,
os_size_t
newNBytes
);
ptr | IN/OUT The existing memory block.
|
newNBytes | IN/OUT The number of bytes the memory block must be able to hold.
|