QUESTIONS ON BOUNDS CHECKER

HI ALL
i want to know that how can bounds checker help me in debugging my memory
leaks.
when i enable it then it shows me the memory leaks and then it shows me that
x bytes which
were allocated from y location was not freed.
is there any way of knowing which line in a partciluar source file caused
the leak.
thanks in advance
Mayank

If you mean kernel-mode, then set the 0x400 bit in GlobalFlag (find it in
the registry), and enjoy.
Then !poolused command in WinDbg will provide you with a count of
allocations for all tags(the tag specified to ExAllocatePoolWithTag).
Driver Verifier does even more, like detecting accesses to freed memory and
beyound the allocated ranges.

Both facilities are $0.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From: “Mayank Kumar”
To: “Windows System Software Devs Interest List”
Sent: Wednesday, December 24, 2003 4:42 PM
Subject: [ntdev] QUESTIONS ON BOUNDS CHECKER

> HI ALL
> i want to know that how can bounds checker help me in debugging my memory
> leaks.
> when i enable it then it shows me the memory leaks and then it shows me that
> x bytes which
> were allocated from y location was not freed.
> is there any way of knowing which line in a partciluar source file caused
> the leak.
> thanks in advance
> Mayank
>
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com

BoundsChecker does much more still as it can be used to remotely monitor the
target system and it tries not to interfere with operation so much.

As far as the original question:

> is there any way of knowing which line in a partciluar source file
caused

I use the latest shipping BoundsChecker and I remotely connect to a target
machine, your mileage may vary. I setup BoundsChecker in the
‘ConfigurationWizard’ to watch my driver. Then I usually enable or load my
driver on the target machine, run something interesting with it, then
disable the driver. From there I ‘Capture System Information’ from my
target in BoundsChecker. In the event Window, I can see any memory leak
events. I right click on a leak event of interest and select the ‘Go to
source of’ option, then ‘Caller’, then my driver name. If the source and
symbol paths have been set properly, it takes me right to the offending
source line. One really
nice thing about this is the freakin target machine doesn’t have to crash
and reboot everytime a memory leak is found during development, and it
points you right to where the leak occurred. In fact, if I was
particularily asleep one day and introduced more than one leak, I can find
all leaks at once, instead of one at a time. I find this to be one VERY
useful feature in the DriverStudio tools.


Bill McKenzie
Compuware Corporation
Watch your IRPs/IRBs/URBs/SRBs/NDIS pkts with our free WDMSniffer tool:
http://frontline.compuware.com/nashua/patches/utility.htm

“Maxim S. Shatskih” wrote in message
news:xxxxx@ntdev…
>
> If you mean kernel-mode, then set the 0x400 bit in GlobalFlag (find it
in
> the registry), and enjoy.
> Then !poolused command in WinDbg will provide you with a count of
> allocations for all tags(the tag specified to ExAllocatePoolWithTag).
> Driver Verifier does even more, like detecting accesses to freed
memory and
> beyound the allocated ranges.
>
> Both facilities are $0.
>
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> xxxxx@storagecraft.com
> http://www.storagecraft.com
>
>
> ----- Original Message -----
> From: “Mayank Kumar”
> To: “Windows System Software Devs Interest List”
> Sent: Wednesday, December 24, 2003 4:42 PM
> Subject: [ntdev] QUESTIONS ON BOUNDS CHECKER
>
>
> > HI ALL
> > i want to know that how can bounds checker help me in debugging my
memory
> > leaks.
> > when i enable it then it shows me the memory leaks and then it shows me
that
> > x bytes which
> > were allocated from y location was not freed.
> > is there any way of knowing which line in a partciluar source file
caused
> > the leak.
> > thanks in advance
> > Mayank
> >
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
> >
> > You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> > To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
>