mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 02:32:57 +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 */
|
/* Free the third level table */
|
||||||
ExpFreeTablePagedPool(Process,
|
ExpFreeTablePagedPool(Process,
|
||||||
Level3,
|
Level3,
|
||||||
HIGH_LEVEL_ENTRIES *
|
SizeOfHandle(HIGH_LEVEL_ENTRIES));
|
||||||
sizeof(PHANDLE_TABLE_ENTRY));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Free the actual table and check if we need to release quota */
|
/* 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 */
|
/* We need a new high level table */
|
||||||
High = ExpAllocateTablePagedPool(HandleTable->QuotaProcess,
|
High = ExpAllocateTablePagedPool(HandleTable->QuotaProcess,
|
||||||
HIGH_LEVEL_ENTRIES);
|
SizeOfHandle(HIGH_LEVEL_ENTRIES));
|
||||||
if (!High) return FALSE;
|
if (!High) return FALSE;
|
||||||
|
|
||||||
/* Allocate a new mid level table as well */
|
/* 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 */
|
/* We failed, free the high level table as welll */
|
||||||
ExpFreeTablePagedPool(HandleTable->QuotaProcess,
|
ExpFreeTablePagedPool(HandleTable->QuotaProcess,
|
||||||
High,
|
High,
|
||||||
HIGH_LEVEL_ENTRIES);
|
SizeOfHandle(HIGH_LEVEL_ENTRIES));
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue