Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ExAllocatePoolWithTag - Can I use same tag name for more than one calls?

456 views
Skip to first unread message

shaji

unread,
Mar 6, 2009, 7:32:17 AM3/6/09
to
Hi all,
I have question regarding ExAllocatePoolWithTag function. The MSDN
documentation says that every allocation code path should use a unique
pool tag to ensure that debuggers and verifiers identify a distinct
allocated block.

Does this mean that for each call to ExAllocatePoolWithTag from my
program, I should use a unique tag name?

Can I make calls to this function with the same tag name?What are the
consequences of doing so?

Thanks in advance,
Shaji.

Maxim S. Shatskih

unread,
Mar 6, 2009, 7:35:54 AM3/6/09
to
> Does this mean that for each call to ExAllocatePoolWithTag from my
> program, I should use a unique tag name?

For each kind of object allocated - this is the usual way.

--
Maxim S. Shatskih
Windows DDK MVP
ma...@storagecraft.com
http://www.storagecraft.com

shaji

unread,
Mar 10, 2009, 7:35:55 AM3/10/09
to
Thanks, Max, for clarifying this. I still have a question.
Is it wrong to use the same pool tag for different objects?
Will it corrupy the system?
Or is this just for the convenience of kernel tools to display the tag
name correctly?

On Mar 6, 5:35 pm, "Maxim S. Shatskih"

Don Burn

unread,
Mar 10, 2009, 7:50:22 AM3/10/09
to
You can use the tag for differing objects, it is purely informational unless
you set the high order bit of the tag (use | PROTECTED_POOL on the tag.
With the high order bit set the tag on a ExFreePoolWithTag is checked to
ensure it is the same as an allocate. This is a useful debugging
technique, as are having tags for specific structures.

--
Don Burn (MVP, Windows DDK)
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
Remove StopSpam to reply


"shaji" <shajip...@gmail.com> wrote in message
news:1ae1efc3-e5de-4935...@q30g2000prq.googlegroups.com...


__________ Information from ESET NOD32 Antivirus, version of virus signature
database 3923 (20090310) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com

__________ Information from ESET NOD32 Antivirus, version of virus signature database 3923 (20090310) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com


Tim Roberts

unread,
Mar 12, 2009, 12:10:26 AM3/12/09
to
shaji <shajip...@gmail.com> wrote:
>
>Thanks, Max, for clarifying this. I still have a question.
>Is it wrong to use the same pool tag for different objects?
>Will it corrupy the system?

Of course not. The tag is just for decoration.

>Or is this just for the convenience of kernel tools to display the tag
>name correctly?

Just that, and to let you find the devices in a memory dump.
--
Tim Roberts, ti...@probo.com
Providenza & Boekelheide, Inc.

Maxim S. Shatskih

unread,
Mar 12, 2009, 4:06:57 PM3/12/09
to
>Is it wrong to use the same pool tag for different objects?

The tags are only for !poolused and POOLMON pool blocks classification.

>Will it corrupy the system?

No, just reduce the classification abilities of the debugging tools.

>Or is this just for the convenience of kernel tools to display the tag
>name correctly?

Yes.

0 new messages