mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 18:15:58 +00:00
- Fix ~4.4 million handle limit bug due to memory corruption. ReactOS can now create 16 million handles as expected (thanks Alex).
svn path=/trunk/; revision=36439
This commit is contained in:
parent
c3320e0a31
commit
9185bead4e
1 changed files with 3 additions and 4 deletions
|
@ -268,8 +268,7 @@ ExpFreeHandleTable(IN PHANDLE_TABLE HandleTable)
|
|||
/* Free the third level table */
|
||||
ExpFreeTablePagedPool(Process,
|
||||
Level3,
|
||||
HIGH_LEVEL_ENTRIES *
|
||||
sizeof(PHANDLE_TABLE_ENTRY));
|
||||
SizeOfHandle(HIGH_LEVEL_ENTRIES));
|
||||
}
|
||||
|
||||
/* Free the actual table and check if we need to release quota */
|
||||
|
@ -540,7 +539,7 @@ ExpAllocateHandleTableEntrySlow(IN PHANDLE_TABLE HandleTable,
|
|||
{
|
||||
/* We need a new high level table */
|
||||
High = ExpAllocateTablePagedPool(HandleTable->QuotaProcess,
|
||||
HIGH_LEVEL_ENTRIES);
|
||||
SizeOfHandle(HIGH_LEVEL_ENTRIES));
|
||||
if (!High) return FALSE;
|
||||
|
||||
/* Allocate a new mid level table as well */
|
||||
|
@ -550,7 +549,7 @@ ExpAllocateHandleTableEntrySlow(IN PHANDLE_TABLE HandleTable,
|
|||
/* We failed, free the high level table as welll */
|
||||
ExpFreeTablePagedPool(HandleTable->QuotaProcess,
|
||||
High,
|
||||
HIGH_LEVEL_ENTRIES);
|
||||
SizeOfHandle(HIGH_LEVEL_ENTRIES));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue