Author: fireball
Date: Tue Sep 23 15:44:31 2008
New Revision: 36439
URL: http://svn.reactos.org/svn/reactos?rev=36439&view=rev
Log:
- Fix ~4.4 million handle limit bug due to memory corruption. ReactOS can now create 16 million handles as expected (thanks Alex).
Modified:
trunk/reactos/ntoskrnl/ex/handle.c
Modified: trunk/reactos/ntoskrnl/ex/handle.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/handle.c?rev=3…
==============================================================================
--- trunk/reactos/ntoskrnl/ex/handle.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ex/handle.c [iso-8859-1] Tue Sep 23 15:44:31 2008
@@ -268,8 +268,7 @@
/* 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 @@
{
/* 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 @@
/* We failed, free the high level table as welll */
ExpFreeTablePagedPool(HandleTable->QuotaProcess,
High,
- HIGH_LEVEL_ENTRIES);
+ SizeOfHandle(HIGH_LEVEL_ENTRIES));
return FALSE;
}
Author: cgutman
Date: Tue Sep 23 15:17:59 2008
New Revision: 36438
URL: http://svn.reactos.org/svn/reactos?rev=36438&view=rev
Log:
- Set CheckForHangSeconds to a default value of 2 if it wasn't set in MiniportInitialize
Modified:
branches/aicom-network-fixes/drivers/network/ndis/ndis/miniport.c
Modified: branches/aicom-network-fixes/drivers/network/ndis/ndis/miniport.c
URL: http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/drivers/net…
==============================================================================
--- branches/aicom-network-fixes/drivers/network/ndis/ndis/miniport.c [iso-8859-1] (original)
+++ branches/aicom-network-fixes/drivers/network/ndis/ndis/miniport.c [iso-8859-1] Tue Sep 23 15:17:59 2008
@@ -1633,6 +1633,10 @@
return (NTSTATUS)NdisStatus;
}
+ /* Check for a hang every two seconds if it wasn't set in MiniportInitialize */
+ if (Adapter->NdisMiniportBlock.CheckForHangSeconds == 0)
+ Adapter->NdisMiniportBlock.CheckForHangSeconds = 2;
+
Adapter->NdisMiniportBlock.OldPnPDeviceState = Adapter->NdisMiniportBlock.PnPDeviceState;
Adapter->NdisMiniportBlock.PnPDeviceState = NdisPnPDeviceStarted;