mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-30 19:26:05 +00:00
[DDK]
- Fix ExAllocateFromZone. I understand it's deprecated, but it having a broken implementation which can't work at all because the one who coded this function failed to understand basic algorithms of linked lists is nonsense. svn path=/trunk/; revision=59494
This commit is contained in:
@@ -3350,9 +3350,10 @@ static __inline PVOID
|
||||
ExAllocateFromZone(
|
||||
IN PZONE_HEADER Zone)
|
||||
{
|
||||
PVOID Result = (PVOID)Zone->FreeList.Next;
|
||||
if (Zone->FreeList.Next)
|
||||
Zone->FreeList.Next = Zone->FreeList.Next->Next;
|
||||
return (PVOID) Zone->FreeList.Next;
|
||||
return Result;
|
||||
}
|
||||
|
||||
static __inline PVOID
|
||||
|
||||
@@ -276,9 +276,10 @@ static __inline PVOID
|
||||
ExAllocateFromZone(
|
||||
IN PZONE_HEADER Zone)
|
||||
{
|
||||
PVOID Result = (PVOID)Zone->FreeList.Next;
|
||||
if (Zone->FreeList.Next)
|
||||
Zone->FreeList.Next = Zone->FreeList.Next->Next;
|
||||
return (PVOID) Zone->FreeList.Next;
|
||||
return Result;
|
||||
}
|
||||
|
||||
static __inline PVOID
|
||||
|
||||
Reference in New Issue
Block a user