SL_MHRealloc


NAME
SL_MHRealloc -- reallocates a memory handle's memory.

SYNOPSIS
success = SL_MHRealloc(memhandle, size);
D0 A0 D0

SLFLAG SL_MHRealloc(MEMHANDLE, SLMSIZE);

FUNCTION
Reallocates a memory handles memory block to be size bytes.

If the new size of the handle is less than half of it's original
size, and the difference between the two sizes is greater than
5k, then this routine will free up the old memory and reallocate
a new smaller sized chunk.

INPUTS
memhandle - as returned by SL_MHAlloc.
size - the new size of the memory handle's memory block.

RESULTS
success - TRUE if the reallocation could be done.
FALSE if it could not be done. One possible reason for
failure, is an out of memory situation.

SEE ALSO
SL_MHAlloc, SL_MHFree, SL_MHGrow, SL_MHShrink, SL_MHLock, SL_MHUnlock, SL_SetMHAttr, SL_GetMHAttr

 

SL_MHRealloc  Command Section By Type  url:SL_MHRealloc
  created:2008-03-01 23:36:25   last updated:2008-03-01 23:36:25
  Copyright © 1985-2024 GrasshopperLLC. All Rights Reserved.

User Contributed Comments For SL_MHRealloc
There are no user contributed comments for this page.