Monday, April 20, 2009

Low-fragmentation heap

Low-fragmentations heap.

Heap fragmentation is when available memory is broken into small, non-contiguous blocks. When this occurs, memory allocation can fail even though there is enough memory in the heap to satisfy the request, because no one block of memory is large enough to satisfy the allocation request.

For applications that have a low memory usage, the standard heap is adequate; allocations will not fail due to heap fragmentation. However, if the application allocates memory frequently and uses a variety of allocation sizes, memory allocation can fail due to heap fragmentation.

Windows XP and Windows Server 2003 introduce the low-fragmentation heap (LFH). This mechanism is built on top of the existing heap, but as the name implies, it reduces fragmentation of the heap. Applications that allocate large amounts of memory in various allocation sizes should use the LFH. Note that the LFH can allocate blocks up to 16 KB. For blocks greater than this, the LFH uses the standard heap.

- MSDN

------------------------------------------------------

We can use it very easily, but it's powerful.

The only remind thing is...
This feature works on Windows XP and Window 2003 server and higher.


No comments:

Post a Comment