Author: cgutman
Date: Tue Dec 23 07:28:02 2008
New Revision: 38299
URL:
http://svn.reactos.org/svn/reactos?rev=38299&view=rev
Log:
- Enable memtrack on debug builds only
Modified:
branches/aicom-network-fixes/drivers/network/tcpip/include/memtrack.h
branches/aicom-network-fixes/lib/drivers/ip/network/memtrack.c
branches/aicom-network-fixes/lib/drivers/oskittcp/include/memtrack.h
Modified: branches/aicom-network-fixes/drivers/network/tcpip/include/memtrack.h
URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/drivers/net…
==============================================================================
--- branches/aicom-network-fixes/drivers/network/tcpip/include/memtrack.h [iso-8859-1]
(original)
+++ branches/aicom-network-fixes/drivers/network/tcpip/include/memtrack.h [iso-8859-1] Tue
Dec 23 07:28:02 2008
@@ -15,6 +15,7 @@
#define AllocatePacketWithBuffer(x,y,z)
AllocatePacketWithBufferX(x,y,z,__FILE__,__LINE__)
#define FreeNdisPacket(x) FreeNdisPacketX(x,__FILE__,__LINE__)
+#ifdef DBG
#define MTMARK() TrackDumpFL(__FILE__, __LINE__)
#define exAllocatePool(x,y) ExAllocatePoolX(x,y,__FILE__,__LINE__)
#define exAllocatePoolWithTag(x,y,z) ExAllocatePoolX(x,y,__FILE__,__LINE__)
@@ -62,5 +63,20 @@
}
#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 exAllocatePoolWithTag(x,y,z) ExAllocatePoolWithTag(x,y,z)
+#define exAllocatePool(x,y) ExAllocatePool(x,y)
+#define exFreePool(x) ExFreePool(x)
+#define exAllocateFromNPagedLookasideList(x) ExAllocateFromNPagedLookasideList(x)
+#define exFreeToNPagedLookasideList(x,y) ExFreeToNPagedLookasideList(x,y)
+#define TrackWithTag(w,x,y,z)
+#define UntrackFL(w,x,y,z)
+#endif
#endif/*MEMMTRAC_H*/
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
07:28:02 2008
@@ -2,6 +2,7 @@
#include "precomp.h"
+#ifdef DBG
#define TRACK_TAG TAG('T','r','C','K')
static LIST_ENTRY AllocatedObjectsList;
@@ -163,3 +164,4 @@
TcpipReleaseSpinLock( &AllocatedObjectsLock, OldIrql );
}
+#endif /* DBG */
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 07:28:02 2008
@@ -8,6 +8,7 @@
#define FBSD_MALLOC FOURCC('d','s','b','f')
#define EXALLOC_TAG FOURCC('E','x','A','l')
+#ifdef DBG
#define MTMARK() TrackDumpFL(__FILE__, __LINE__)
#define NdisAllocateBuffer(x,y,z,a,b) { \
NdisAllocateBuffer(x,y,z,a,b); \
@@ -59,5 +60,21 @@
}
#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 exAllocateFromNPagedLookasideList(x) ExAllocateFromNPagedLookasideList(x)
+#define exFreeToNPagedLookasideList(x,y) ExFreeToNPagedLookasideList(x,y)
+#define TrackWithTag(w,x,y,z)
+#define UntrackFL(w,x,y,z)
+#endif
#endif/*MEMMTRAC_H*/