SL_MHShrink


NAME
SL_MHShrink -- decreases the size of a memory handle.

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

SLFLAG SL_MHShrink(MEMHANDLE, SLMSIZE);

FUNCTION
Decreases the size of a memory handle by 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 number of bytes to shrink the memory handle by.

RESULTS
success - TRUE if the memory could be shrunk.
FALSE if the memory could not be shrunk.

SEE ALSO
SL_MHAlloc, SL_MHFree, SL_MHGrow, SL_MHRealloc, SL_MHLock, SL_MHUnlock, SL_SetMHAttr, SL_GetMHAttr.

 

SL_MHShrink  Command Section By Type  url:SL_MHShrink
  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_MHShrink
There are no user contributed comments for this page.