mirror of
https://github.com/reactos/reactos.git
synced 2025-07-27 14:33:44 +00:00
[RTL/HEAP]
- Thomas Faber: Use macro instead of manually removing item from the list. See issue #6016 for more details. svn path=/trunk/; revision=51119
This commit is contained in:
parent
64e9e4c196
commit
4fb00286d5
1 changed files with 2 additions and 11 deletions
|
@ -341,18 +341,9 @@ RtlpRemoveFreeBlock(PHEAP Heap,
|
||||||
BOOLEAN NoFill)
|
BOOLEAN NoFill)
|
||||||
{
|
{
|
||||||
SIZE_T Result, RealSize;
|
SIZE_T Result, RealSize;
|
||||||
PLIST_ENTRY OldBlink, OldFlink;
|
|
||||||
|
|
||||||
// FIXME: Maybe use RemoveEntryList?
|
/* Remove the free block and update the freelists bitmap */
|
||||||
|
if (RemoveEntryList(&FreeEntry->FreeList) &&
|
||||||
/* Remove the free block */
|
|
||||||
OldFlink = FreeEntry->FreeList.Flink;
|
|
||||||
OldBlink = FreeEntry->FreeList.Blink;
|
|
||||||
OldBlink->Flink = OldFlink;
|
|
||||||
OldFlink->Blink = OldBlink;
|
|
||||||
|
|
||||||
/* Update the freelists bitmap */
|
|
||||||
if ((OldFlink == OldBlink) &&
|
|
||||||
(Dedicated || (!Dedicated && FreeEntry->Size < HEAP_FREELISTS)))
|
(Dedicated || (!Dedicated && FreeEntry->Size < HEAP_FREELISTS)))
|
||||||
{
|
{
|
||||||
RtlpClearFreeListsBit(Heap, FreeEntry);
|
RtlpClearFreeListsBit(Heap, FreeEntry);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue