UINT LocalShrink(hloc, cbNewSize) | |||||
HLOCAL hloc; | /* segment containing local heap | */ | |||
UINT cbNewSize; | /* new size of local heap | */ |
The LocalShrink function shrinks the local heap in the given segment.
hloc
Identifies the segment that contains the local heap. If this parameter is zero, the function shrinks the heap in the current data segment.
cbNewSize
Specifies the new size, in bytes, of the local heap.
The return value specifies the new size of the local heap if the function is successful.
Windows will not shrink the portion of the data segment that contains the stack and the static variables.
Use the GlobalSize function to determine the new size of the data segment.