Author: cgutman
Date: Tue Dec 23 06:40:58 2008
New Revision: 38298
URL:
http://svn.reactos.org/svn/reactos?rev=38298&view=rev
Log:
Huge memtrack commit (part 2 of 2)
Modified:
branches/aicom-network-fixes/lib/drivers/ip/network/address.c
branches/aicom-network-fixes/lib/drivers/ip/network/ip.c
branches/aicom-network-fixes/lib/drivers/ip/network/loopback.c
branches/aicom-network-fixes/lib/drivers/ip/network/memtrack.c
branches/aicom-network-fixes/lib/drivers/ip/network/neighbor.c
branches/aicom-network-fixes/lib/drivers/ip/network/ports.c
branches/aicom-network-fixes/lib/drivers/ip/network/receive.c
branches/aicom-network-fixes/lib/drivers/ip/network/router.c
branches/aicom-network-fixes/lib/drivers/ip/network/transmit.c
branches/aicom-network-fixes/lib/drivers/ip/transport/tcp/accept.c
branches/aicom-network-fixes/lib/drivers/ip/transport/tcp/event.c
branches/aicom-network-fixes/lib/drivers/ip/transport/tcp/tcp.c
branches/aicom-network-fixes/lib/drivers/oskittcp/include/memtrack.h
Modified: branches/aicom-network-fixes/lib/drivers/ip/network/address.c
URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/lib/drivers…
==============================================================================
--- branches/aicom-network-fixes/lib/drivers/ip/network/address.c [iso-8859-1] (original)
+++ branches/aicom-network-fixes/lib/drivers/ip/network/address.c [iso-8859-1] Tue Dec 23
06:40:58 2008
@@ -106,7 +106,7 @@
* Nothing
*/
{
- PoolFreeBuffer(Object);
+ exFreePool(Object);
}
Modified: branches/aicom-network-fixes/lib/drivers/ip/network/ip.c
URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/lib/drivers…
==============================================================================
--- branches/aicom-network-fixes/lib/drivers/ip/network/ip.c [iso-8859-1] (original)
+++ branches/aicom-network-fixes/lib/drivers/ip/network/ip.c [iso-8859-1] Tue Dec 23
06:40:58 2008
@@ -33,7 +33,7 @@
* Object = Pointer to an IP packet structure
*/
{
- TcpipFreeToNPagedLookasideList(&IPPacketList, Object);
+ exFreeToNPagedLookasideList(&IPPacketList, Object);
}
@@ -70,7 +70,7 @@
{
PIP_PACKET IPPacket;
- IPPacket = TcpipAllocateFromNPagedLookasideList(&IPPacketList);
+ IPPacket = exAllocateFromNPagedLookasideList(&IPPacketList);
if (!IPPacket)
return NULL;
Modified: branches/aicom-network-fixes/lib/drivers/ip/network/loopback.c
URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/lib/drivers…
==============================================================================
--- branches/aicom-network-fixes/lib/drivers/ip/network/loopback.c [iso-8859-1]
(original)
+++ branches/aicom-network-fixes/lib/drivers/ip/network/loopback.c [iso-8859-1] Tue Dec 23
06:40:58 2008
@@ -45,7 +45,7 @@
Adapter = WorkItem->Adapter;
BytesTransferred = WorkItem->BytesTransferred;
- ExFreePool( WorkItem );
+ exFreePool( WorkItem );
IPPacket.NdisPacket = Packet;
@@ -88,7 +88,7 @@
TcpipAcquireSpinLock( &LoopWorkLock, &OldIrql );
- WQItem = ExAllocatePool( NonPagedPool, sizeof(LAN_WQ_ITEM) );
+ WQItem = exAllocatePool( NonPagedPool, sizeof(LAN_WQ_ITEM) );
if( !WQItem ) {
TcpipReleaseSpinLock( &LoopWorkLock, OldIrql );
return;
Modified: branches/aicom-network-fixes/lib/drivers/ip/network/memtrack.c
URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/lib/drivers…
==============================================================================
--- branches/aicom-network-fixes/lib/drivers/ip/network/memtrack.c [iso-8859-1]
(original)
+++ branches/aicom-network-fixes/lib/drivers/ip/network/memtrack.c [iso-8859-1] Tue Dec 23
06:40:58 2008
@@ -1,7 +1,6 @@
#define MEMTRACK_NO_POOL
#include "precomp.h"
-#ifdef MEMTRACK
#define TRACK_TAG TAG('T','r','C','K')
@@ -29,12 +28,24 @@
0 );
}
-VOID ShowTrackedThing( PCHAR What, PALLOCATION_TRACKER Thing,
- PCHAR File, UINT Line ) {
- /* if( ShowTag( Thing->Tag ) ) */
- if( File ) {
+VOID ShowTrackedThing( PCHAR What, PALLOCATION_TRACKER Thing, BOOLEAN ForceShow ) {
+
+ if (ForceShow)
+ {
+ DbgPrint("[%s] Thing %08x %c%c%c%c (%s:%d)\n",
+ What,
+ Thing->Thing,
+ ((PCHAR)&Thing->Tag)[3],
+ ((PCHAR)&Thing->Tag)[2],
+ ((PCHAR)&Thing->Tag)[1],
+ ((PCHAR)&Thing->Tag)[0],
+ Thing->FileName,
+ Thing->LineNo);
+ }
+ else
+ {
TI_DbgPrint(MAX_TRACE,
- ("[%s] Thing %08x %c%c%c%c (%s:%d) (Called from %s:%d)\n",
+ ("[%s] Thing %08x %c%c%c%c (%s:%d)\n",
What,
Thing->Thing,
((PCHAR)&Thing->Tag)[3],
@@ -42,19 +53,7 @@
((PCHAR)&Thing->Tag)[1],
((PCHAR)&Thing->Tag)[0],
Thing->FileName,
- Thing->LineNo,
- File, Line));
- } else {
- TI_DbgPrint(MAX_TRACE,
- ( "[%s] Thing %08x %c%c%c%c (%s:%d)\n",
- What,
- Thing->Thing,
- ((PCHAR)&Thing->Tag)[3],
- ((PCHAR)&Thing->Tag)[2],
- ((PCHAR)&Thing->Tag)[1],
- ((PCHAR)&Thing->Tag)[0],
- Thing->FileName,
- Thing->LineNo ));
+ Thing->LineNo));
}
}
@@ -66,6 +65,15 @@
PLIST_ENTRY Entry;
PALLOCATION_TRACKER ThingInList;
+ if (!TrackedThing) return;
+
+ TrackedThing->Tag = Tag;
+ TrackedThing->Thing = Thing;
+ TrackedThing->FileName = FileName;
+ TrackedThing->LineNo = LineNo;
+
+ ShowTrackedThing( "Alloc", TrackedThing, FALSE );
+
TcpipAcquireSpinLock( &AllocatedObjectsLock, &OldIrql );
Entry = AllocatedObjectsList.Flink;
while( Entry != &AllocatedObjectsList ) {
@@ -74,25 +82,21 @@
RemoveEntryList(Entry);
TcpipReleaseSpinLock( &AllocatedObjectsLock, OldIrql );
- ShowTrackedThing( "Alloc", ThingInList, FileName, LineNo );
- PoolFreeBuffer( ThingInList );
+ ShowTrackedThing( "Alloc", ThingInList, FALSE );
+
TrackDumpFL( FileName, LineNo );
DbgPrint("TRACK: SPECIFIED ALREADY ALLOCATED ITEM %x\n", Thing);
+ ShowTrackedThing( "Double Alloc (Item in list)", ThingInList, TRUE
);
+ ShowTrackedThing( "Double Alloc (Item not in list)", TrackedThing,
TRUE );
TcpipBugCheck( 0 );
+
+ ExFreeToNPagedLookasideList( &AllocatedObjectsLookasideList,
+ ThingInList );
}
Entry = Entry->Flink;
}
- if( TrackedThing ) {
- TrackedThing->Tag = Tag;
- TrackedThing->Thing = Thing;
- TrackedThing->FileName = FileName;
- TrackedThing->LineNo = LineNo;
-
-
- InsertHeadList( &AllocatedObjectsList, &TrackedThing->Entry );
- ShowTrackedThing( "Alloc", TrackedThing, FileName, LineNo );
- }
+ InsertHeadList( &AllocatedObjectsList, &TrackedThing->Entry );
TcpipReleaseSpinLock( &AllocatedObjectsLock, OldIrql );
@@ -107,7 +111,7 @@
return TagsToShow[i] ? TRUE : FALSE;
}
-VOID UntrackFL( PCHAR File, DWORD Line, PVOID Thing ) {
+VOID UntrackFL( PCHAR File, DWORD Line, PVOID Thing, DWORD Tag ) {
KIRQL OldIrql;
PLIST_ENTRY Entry;
PALLOCATION_TRACKER ThingInList;
@@ -119,19 +123,25 @@
if( ThingInList->Thing == Thing ) {
RemoveEntryList(Entry);
- ShowTrackedThing( "Free ", ThingInList, File, Line );
+ ShowTrackedThing( "Free ", ThingInList, FALSE );
+
+ if ( ThingInList->Tag != Tag ) {
+ DbgPrint("UNTRACK: TAG DOES NOT MATCH (%x)\n", Thing);
+ ShowTrackedThing("Tag Mismatch (Item in list)", ThingInList,
TRUE);
+ TcpipBugCheck( 0 );
+ }
ExFreeToNPagedLookasideList( &AllocatedObjectsLookasideList,
ThingInList );
TcpipReleaseSpinLock( &AllocatedObjectsLock, OldIrql );
+
/* TrackDumpFL( File, Line ); */
return;
}
Entry = Entry->Flink;
}
TcpipReleaseSpinLock( &AllocatedObjectsLock, OldIrql );
- TrackDumpFL( File, Line );
DbgPrint("UNTRACK: SPECIFIED ALREADY FREE ITEM %x\n", Thing);
TcpipBugCheck( 0 );
}
@@ -147,10 +157,9 @@
Entry = AllocatedObjectsList.Flink;
while( Entry != &AllocatedObjectsList ) {
Thing = CONTAINING_RECORD(Entry, ALLOCATION_TRACKER, Entry);
- ShowTrackedThing( "Dump ", Thing, 0, 0 );
+ ShowTrackedThing( "Dump ", Thing, FALSE );
Entry = Entry->Flink;
}
TcpipReleaseSpinLock( &AllocatedObjectsLock, OldIrql );
}
-#endif/*MEMTRACK*/
Modified: branches/aicom-network-fixes/lib/drivers/ip/network/neighbor.c
URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/lib/drivers…
==============================================================================
--- branches/aicom-network-fixes/lib/drivers/ip/network/neighbor.c [iso-8859-1]
(original)
+++ branches/aicom-network-fixes/lib/drivers/ip/network/neighbor.c [iso-8859-1] Tue Dec 23
06:40:58 2008
@@ -21,7 +21,7 @@
ASSERT_KM_POINTER(Packet->Complete);
Packet->Complete( Packet->Context, Packet->Packet, Status );
TI_DbgPrint(MID_TRACE, ("Completed\n"));
- PoolFreeBuffer( Packet );
+ exFreePool( Packet );
TI_DbgPrint(MID_TRACE, ("Freed\n"));
}
@@ -89,7 +89,7 @@
ErrorCode );
}
- PoolFreeBuffer( Packet );
+ exFreePool( Packet );
}
}
@@ -283,7 +283,7 @@
"LinkAddress (0x%X) LinkAddressLength (%d) State (0x%X)\n",
Interface, Address, LinkAddress, LinkAddressLength, State));
- NCE = ExAllocatePool
+ NCE = exAllocatePool
(NonPagedPool, sizeof(NEIGHBOR_CACHE_ENTRY) + LinkAddressLength);
if (NCE == NULL)
{
@@ -466,7 +466,7 @@
(DEBUG_NCACHE,
("Called. NCE (0x%X) NdisPacket (0x%X).\n", NCE, NdisPacket));
- Packet = PoolAllocateBuffer( sizeof(NEIGHBOR_PACKET) );
+ Packet = exAllocatePool( NonPagedPool, sizeof(NEIGHBOR_PACKET) );
if( !Packet ) return FALSE;
/* FIXME: Should we limit the number of queued packets? */
@@ -529,7 +529,7 @@
*PrevNCE = CurNCE->Next;
NBFlushPacketQueue( CurNCE, TRUE, NDIS_STATUS_REQUEST_ABORTED );
- ExFreePool(CurNCE);
+ exFreePool(CurNCE);
break;
}
Modified: branches/aicom-network-fixes/lib/drivers/ip/network/ports.c
URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/lib/drivers…
==============================================================================
--- branches/aicom-network-fixes/lib/drivers/ip/network/ports.c [iso-8859-1] (original)
+++ branches/aicom-network-fixes/lib/drivers/ip/network/ports.c [iso-8859-1] Tue Dec 23
06:40:58 2008
@@ -17,7 +17,7 @@
PortSet->PortsToOversee = PortsToManage;
PortSet->ProtoBitBuffer =
- PoolAllocateBuffer( (PortSet->PortsToOversee + 7) / 8 );
+ exAllocatePool( NonPagedPool, (PortSet->PortsToOversee + 7) / 8 );
if(!PortSet->ProtoBitBuffer) return STATUS_INSUFFICIENT_RESOURCES;
RtlInitializeBitMap( &PortSet->ProtoBitmap,
PortSet->ProtoBitBuffer,
@@ -28,7 +28,7 @@
}
VOID PortsShutdown( PPORT_SET PortSet ) {
- PoolFreeBuffer( PortSet->ProtoBitBuffer );
+ exFreePool( PortSet->ProtoBitBuffer );
}
VOID DeallocatePort( PPORT_SET PortSet, ULONG Port ) {
Modified: branches/aicom-network-fixes/lib/drivers/ip/network/receive.c
URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/lib/drivers…
==============================================================================
--- branches/aicom-network-fixes/lib/drivers/ip/network/receive.c [iso-8859-1] (original)
+++ branches/aicom-network-fixes/lib/drivers/ip/network/receive.c [iso-8859-1] Tue Dec 23
06:40:58 2008
@@ -41,7 +41,7 @@
TI_DbgPrint(DEBUG_IP, ("Called. First (%d) Last (%d).\n", First, Last));
- Hole = TcpipAllocateFromNPagedLookasideList(&IPHoleList);
+ Hole = exAllocateFromNPagedLookasideList(&IPHoleList);
if (!Hole) {
TI_DbgPrint(MIN_TRACE, ("Insufficient resources.\n"));
return NULL;
@@ -82,7 +82,7 @@
TI_DbgPrint(DEBUG_IP, ("Freeing hole descriptor at (0x%X).\n", CurrentH));
/* And free the hole descriptor */
- TcpipFreeToNPagedLookasideList(&IPHoleList, CurrentH);
+ exFreeToNPagedLookasideList(&IPHoleList, CurrentH);
CurrentEntry = NextEntry;
}
@@ -103,13 +103,13 @@
TI_DbgPrint(DEBUG_IP, ("Freeing fragment at (0x%X).\n", CurrentF));
/* And free the fragment descriptor */
- TcpipFreeToNPagedLookasideList(&IPFragmentList, CurrentF);
+ exFreeToNPagedLookasideList(&IPFragmentList, CurrentF);
CurrentEntry = NextEntry;
}
TI_DbgPrint(DEBUG_IP, ("Freeing IPDR data at (0x%X).\n", IPDR));
- TcpipFreeToNPagedLookasideList(&IPDRList, IPDR);
+ exFreeToNPagedLookasideList(&IPDRList, IPDR);
}
@@ -311,7 +311,7 @@
TI_DbgPrint(DEBUG_IP, ("Starting new assembly.\n"));
/* We don't have a reassembly structure, create one */
- IPDR = TcpipAllocateFromNPagedLookasideList(&IPDRList);
+ IPDR = exAllocateFromNPagedLookasideList(&IPDRList);
if (!IPDR)
/* We don't have the resources to process this packet, discard it */
return;
@@ -322,7 +322,7 @@
Hole = CreateHoleDescriptor(0, 65536);
if (!Hole) {
/* We don't have the resources to process this packet, discard it */
- TcpipFreeToNPagedLookasideList(&IPDRList, IPDR);
+ exFreeToNPagedLookasideList(&IPDRList, IPDR);
return;
}
AddrInitIPv4(&IPDR->SrcAddr, IPv4Header->SrcAddr);
@@ -390,7 +390,7 @@
/* Put the new hole descriptor in the list */
InsertTailList(&IPDR->HoleListHead, &Hole->ListEntry);
} else
- TcpipFreeToNPagedLookasideList(&IPHoleList, Hole);
+ exFreeToNPagedLookasideList(&IPHoleList, Hole);
/* If this is the first fragment, save the IP header */
if (FragFirst == 0) {
@@ -404,7 +404,7 @@
/* Create a buffer, copy the data into it and put it
in the fragment list */
- Fragment = TcpipAllocateFromNPagedLookasideList(&IPFragmentList);
+ Fragment = exAllocateFromNPagedLookasideList(&IPFragmentList);
if (!Fragment) {
/* We don't have the resources to process this packet, discard it */
Cleanup(&IPDR->Lock, OldIrql, IPDR, NULL);
Modified: branches/aicom-network-fixes/lib/drivers/ip/network/router.c
URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/lib/drivers…
==============================================================================
--- branches/aicom-network-fixes/lib/drivers/ip/network/router.c [iso-8859-1] (original)
+++ branches/aicom-network-fixes/lib/drivers/ip/network/router.c [iso-8859-1] Tue Dec 23
06:40:58 2008
@@ -51,7 +51,7 @@
* Object = Pointer to an forward information base structure
*/
{
- PoolFreeBuffer(Object);
+ exFreePool(Object);
}
@@ -213,7 +213,7 @@
A2S(Netmask),
A2S(&Router->Address)));
- FIBE = PoolAllocateBuffer(sizeof(FIB_ENTRY));
+ FIBE = exAllocatePool(NonPagedPool, sizeof(FIB_ENTRY));
if (!FIBE) {
TI_DbgPrint(MIN_TRACE, ("Insufficient resources.\n"));
return NULL;
Modified: branches/aicom-network-fixes/lib/drivers/ip/network/transmit.c
URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/lib/drivers…
==============================================================================
--- branches/aicom-network-fixes/lib/drivers/ip/network/transmit.c [iso-8859-1]
(original)
+++ branches/aicom-network-fixes/lib/drivers/ip/network/transmit.c [iso-8859-1] Tue Dec 23
06:40:58 2008
@@ -212,14 +212,14 @@
if (!PrepareNextFragment(IFC)) {
FreeNdisPacket(IFC->NdisPacket);
- ExFreePool(IFC);
+ exFreePool(IFC);
return NDIS_STATUS_FAILURE;
}
if (!NT_SUCCESS((NdisStatus = IPSendFragment(IFC->NdisPacket, NCE, IFC))))
{
FreeNdisPacket(IFC->NdisPacket);
- ExFreePool(IFC);
+ exFreePool(IFC);
}
return NdisStatus;
Modified: branches/aicom-network-fixes/lib/drivers/ip/transport/tcp/accept.c
URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/lib/drivers…
==============================================================================
--- branches/aicom-network-fixes/lib/drivers/ip/transport/tcp/accept.c [iso-8859-1]
(original)
+++ branches/aicom-network-fixes/lib/drivers/ip/transport/tcp/accept.c [iso-8859-1] Tue
Dec 23 06:40:58 2008
@@ -115,7 +115,7 @@
if( Bucket->AssociatedEndpoint == Connection ) {
RemoveEntryList( &Bucket->Entry );
- ExFreePool( Bucket );
+ exFreePool( Bucket );
break;
}
@@ -142,7 +142,7 @@
(PTDI_REQUEST_KERNEL)Request );
if( Status == STATUS_PENDING ) {
- Bucket = ExAllocatePool( NonPagedPool, sizeof(*Bucket) );
+ Bucket = exAllocatePool( NonPagedPool, sizeof(*Bucket) );
if( Bucket ) {
Bucket->AssociatedEndpoint = Connection;
Modified: branches/aicom-network-fixes/lib/drivers/ip/transport/tcp/event.c
URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/lib/drivers…
==============================================================================
--- branches/aicom-network-fixes/lib/drivers/ip/transport/tcp/event.c [iso-8859-1]
(original)
+++ branches/aicom-network-fixes/lib/drivers/ip/transport/tcp/event.c [iso-8859-1] Tue Dec
23 06:40:58 2008
@@ -119,7 +119,7 @@
("Called TSLEEP: tok = %x, pri = %d, wmesg = %s, tmio = %x\n",
token, priority, msg, tmio));
- SleepingThread = PoolAllocateBuffer( sizeof( *SleepingThread ) );
+ SleepingThread = exAllocatePool( NonPagedPool, sizeof( *SleepingThread ) );
if( SleepingThread ) {
KeInitializeEvent( &SleepingThread->Event, NotificationEvent, FALSE );
SleepingThread->SleepToken = token;
@@ -146,7 +146,7 @@
TcpipRecursiveMutexEnter( &TCPLock, TRUE );
- PoolFreeBuffer( SleepingThread );
+ exFreePool( SleepingThread );
} else
return OSK_ENOBUFS;
@@ -238,22 +238,22 @@
if ( ! Found ) {
if ( ArrayAllocated <= ArrayUsed ) {
NewSize = ( 0 == ArrayAllocated ? 16 : 2 * ArrayAllocated );
- NewArray = PoolAllocateBuffer( 2 * NewSize * sizeof( OSK_UINT ) );
+ NewArray = exAllocatePool( NonPagedPool, 2 * NewSize * sizeof( OSK_UINT ) );
if ( NULL != NewArray ) {
if ( 0 != ArrayAllocated ) {
memcpy( NewArray, Sizes,
ArrayAllocated * sizeof( OSK_UINT ) );
- PoolFreeBuffer( Sizes );
+ exFreePool( Sizes );
memcpy( NewArray + NewSize, Counts,
ArrayAllocated * sizeof( OSK_UINT ) );
- PoolFreeBuffer( Counts );
+ exFreePool( Counts );
}
Sizes = NewArray;
Counts = NewArray + NewSize;
ArrayAllocated = NewSize;
} else if ( 0 != ArrayAllocated ) {
- PoolFreeBuffer( Sizes );
- PoolFreeBuffer( Counts );
+ exFreePool( Sizes );
+ exFreePool( Counts );
ArrayAllocated = 0;
}
}
@@ -281,7 +281,7 @@
v = ExAllocateFromNPagedLookasideList( &LargeLookasideList );
Signature = SIGNATURE_LARGE;
} else {
- v = PoolAllocateBuffer( Bytes + sizeof(ULONG) );
+ v = ExAllocatePool( NonPagedPool, Bytes + sizeof(ULONG) );
Signature = SIGNATURE_OTHER;
}
if( v ) {
@@ -297,7 +297,7 @@
void *data, OSK_PCHAR File, OSK_UINT Line ) {
ULONG Signature;
- UntrackFL( (PCHAR)File, Line, data );
+ UntrackFL( (PCHAR)File, Line, data,
FOURCC('f','b','s','d') );
data = (void *)((char *) data - sizeof(ULONG));
Signature = *((ULONG *) data);
if ( SIGNATURE_SMALL == Signature ) {
@@ -305,7 +305,7 @@
} else if ( SIGNATURE_LARGE == Signature ) {
ExFreeToNPagedLookasideList( &LargeLookasideList, data );
} else if ( SIGNATURE_OTHER == Signature ) {
- PoolFreeBuffer( data );
+ ExFreePool( data );
} else {
ASSERT( FALSE );
}
Modified: branches/aicom-network-fixes/lib/drivers/ip/transport/tcp/tcp.c
URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/lib/drivers…
==============================================================================
--- branches/aicom-network-fixes/lib/drivers/ip/transport/tcp/tcp.c [iso-8859-1]
(original)
+++ branches/aicom-network-fixes/lib/drivers/ip/transport/tcp/tcp.c [iso-8859-1] Tue Dec
23 06:40:58 2008
@@ -53,7 +53,7 @@
Complete( Bucket->Request.RequestContext, Status, 0 );
/* Frees the bucket allocated in TCPConnect */
- PoolFreeBuffer( Bucket );
+ exFreePool( Bucket );
}
}
@@ -90,7 +90,7 @@
break;
} else {
Complete( Bucket->Request.RequestContext, Status, 0 );
- PoolFreeBuffer( Bucket );
+ exFreePool( Bucket );
}
}
}
@@ -142,7 +142,7 @@
Complete( Bucket->Request.RequestContext,
STATUS_SUCCESS, Received );
- PoolFreeBuffer( Bucket );
+ exFreePool( Bucket );
} else if( Status == STATUS_PENDING ) {
InsertHeadList
( &Connection->ReceiveRequest, &Bucket->Entry );
@@ -152,7 +152,7 @@
("Completing Receive request: %x %x\n",
Bucket->Request, Status));
Complete( Bucket->Request.RequestContext, Status, 0 );
- PoolFreeBuffer( Bucket );
+ exFreePool( Bucket );
}
}
}
@@ -201,7 +201,7 @@
Complete( Bucket->Request.RequestContext,
STATUS_SUCCESS, Sent );
- PoolFreeBuffer( Bucket );
+ exFreePool( Bucket );
} else if( Status == STATUS_PENDING ) {
InsertHeadList
( &Connection->SendRequest, &Bucket->Entry );
@@ -211,7 +211,7 @@
("Completing Send request: %x %x\n",
Bucket->Request, Status));
Complete( Bucket->Request.RequestContext, Status, 0 );
- PoolFreeBuffer( Bucket );
+ exFreePool( Bucket );
}
}
}
@@ -238,7 +238,7 @@
Bucket = CONTAINING_RECORD( Entry, TDI_BUCKET, Entry );
Complete = Bucket->Request.RequestNotifyObject;
Complete( Bucket->Request.RequestContext, IrpStatus[i], 0 );
- PoolFreeBuffer( Bucket );
+ exFreePool( Bucket );
}
}
}
@@ -260,7 +260,7 @@
PCONNECTION_ENDPOINT TCPAllocateConnectionEndpoint( PVOID ClientContext ) {
PCONNECTION_ENDPOINT Connection =
- ExAllocatePool(NonPagedPool, sizeof(CONNECTION_ENDPOINT));
+ exAllocatePool(NonPagedPool, sizeof(CONNECTION_ENDPOINT));
if (!Connection)
return Connection;
@@ -283,7 +283,7 @@
VOID TCPFreeConnectionEndpoint( PCONNECTION_ENDPOINT Connection ) {
TCPClose( Connection );
- ExFreePool( Connection );
+ exFreePool( Connection );
}
NTSTATUS TCPSocket( PCONNECTION_ENDPOINT Connection,
@@ -545,7 +545,7 @@
TI_DbgPrint(DEBUG_TCP,("TCPConnect: Called\n"));
- Bucket = ExAllocatePool( NonPagedPool, sizeof(*Bucket) );
+ Bucket = exAllocatePool( NonPagedPool, sizeof(*Bucket) );
if( !Bucket ) return STATUS_NO_MEMORY;
TcpipRecursiveMutexEnter( &TCPLock, TRUE );
@@ -695,7 +695,7 @@
/* Keep this request around ... there was no data yet */
if( Status == STATUS_PENDING ) {
/* Freed in TCPSocketState */
- Bucket = ExAllocatePool( NonPagedPool, sizeof(*Bucket) );
+ Bucket = exAllocatePool( NonPagedPool, sizeof(*Bucket) );
if( !Bucket ) {
TI_DbgPrint(DEBUG_TCP,("Failed to allocate bucket\n"));
TcpipRecursiveMutexLeave( &TCPLock );
@@ -754,7 +754,7 @@
/* Keep this request around ... there was no data yet */
if( Status == STATUS_PENDING ) {
/* Freed in TCPSocketState */
- Bucket = ExAllocatePool( NonPagedPool, sizeof(*Bucket) );
+ Bucket = exAllocatePool( NonPagedPool, sizeof(*Bucket) );
if( !Bucket ) {
TI_DbgPrint(DEBUG_TCP,("Failed to allocate bucket\n"));
TcpipRecursiveMutexLeave( &TCPLock );
@@ -845,7 +845,7 @@
if( Bucket->Request.RequestContext == Irp ) {
RemoveEntryList( &Bucket->Entry );
- PoolFreeBuffer( Bucket );
+ exFreePool( Bucket );
break;
}
}
Modified: branches/aicom-network-fixes/lib/drivers/oskittcp/include/memtrack.h
URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/lib/drivers…
==============================================================================
--- branches/aicom-network-fixes/lib/drivers/oskittcp/include/memtrack.h [iso-8859-1]
(original)
+++ branches/aicom-network-fixes/lib/drivers/oskittcp/include/memtrack.h [iso-8859-1] Tue
Dec 23 06:40:58 2008
@@ -8,7 +8,6 @@
#define FBSD_MALLOC FOURCC('d','s','b','f')
#define EXALLOC_TAG FOURCC('E','x','A','l')
-#ifdef MEMTRACK
#define MTMARK() TrackDumpFL(__FILE__, __LINE__)
#define NdisAllocateBuffer(x,y,z,a,b) { \
NdisAllocateBuffer(x,y,z,a,b); \
@@ -60,19 +59,5 @@
}
#define MEMTRACK_MAX_TAGS_TO_TRACK 64
-#else
-#define MTMARK()
-#define Track(x,y)
-#define TrackingInit()
-#define TrackDump()
-#define Untrack(x)
-#define TrackTag(x)
-#define FreeNdisPacket FreeNdisPacketX
-#define exFreePool(x) ExFreePool(x)
-#define exAllocatePool(x,y) ExAllocatePool(x,y)
-#define exAllocatePoolWithTag(x,y,z) ExAllocatePoolWithTag(x,y,z)
-#define TrackWithTag(a,b,c,d)
-#define UntrackFL(a,b,c)
-#endif
#endif/*MEMMTRAC_H*/