Some other local memory functions parallel those for global memory allocations, except that sizes are in terms of wBytes rather than dwBytes. You can get the current size of a local memory block by calling:
wBytes = LocalSize (hLocalMemory) ;
The function LocalReAlloc can change the size of an allocated memory block, change a moveable block to discardable, change a discardable block to nondiscardable, and discard a discardable block, just like GlobalReAlloc. During a LocalReAlloc call, Windows may expand the size of the local heap by expanding the size of the entire data segment, possibly moving it to another location in memory. LocalCompact can determine the amount of free local memory available in the heap, LocalDiscard discards a discardable memory block, and LocalFlags provides the current status of discardable blocks.
Two other local memory functions do not have counterparts in the global memory functions. You can prevent your local heap from being compacted by calling:
LocalFreeze (0) ;
When you later want to allow compacting, you can call:
LocalMelt (0) ;