[RTL/DPH]
authorAleksey Bragin <aleksey@reactos.org>
Mon, 21 Feb 2011 22:42:21 +0000 (22:42 +0000)
committerAleksey Bragin <aleksey@reactos.org>
Mon, 21 Feb 2011 22:42:21 +0000 (22:42 +0000)
commite9af1d723fb81ebcb2d76162ff9061ef33de9e61
treeba60095850d0097b8212b39dcf6d778aa1cc6aa7
parent77aa443412889bfbb17d8203366f61a34d991cb2
[RTL/DPH]
- Implement heap free operation using already implemented busy/free/available/unused lists support and other base routines.
- Implement missing place to free list and remove from busy list routines.
- Implement find busy block routine (using AVL tree).
- Fix a bug in RtlpDphCoalesceNodeIntoAvailable() which resulted in unwanted attempt to merge the only node with itself (which failed anyway).
- Fix a bug in RtlpDphCoalesceNodeIntoAvailable() which incorrectly removed a node from available list (which is implemented as a standard NT double-linked list, compared to unused and free lists which are implemented as single-linked custom lists and busy list which is an AVL tree). Result of that bug was an infinite loop at the next attempt to traverse the list of available nodes.
- In RtlpDphCoalesceFreeIntoAvailable() break when FreeAllocations becomes less than LeaveOnFreeList (before it would break 1 size too early).
- Fix list traversal in RtlpDphSearchAvailableMemoryListForBestFit(). If it couldn't find a node, it would return the last node in the list instead of NULL.
- In RtlpDphFindAvailableMemory(), a new smaller size should be 4 times smaller, not just 2.
- Add a #if0-ed section in RtlpDphRemoveFromAvailableList which checks if a request to remove node not in the list performed. Used only for debugging.
- Add a trace dprint to every type of list insert/removal operation for easier tracking.
- Add break on NULL ptr freeing support.
- RtlpDphSetProtectionAfterUse() is stubbed and protection is set directly in RtlpDphHeapFree(). To be moved into this function.

svn path=/trunk/; revision=50860
reactos/lib/rtl/heappage.c