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

Get buffer size of ExAllocatePoolWithTag

19 views
Skip to first unread message

David F.

unread,
Dec 23, 2009, 2:11:50 PM12/23/09
to
Hi,

Is there a way to get the size of a buffer allocated with
ExAllocatePoolWithTag without having to put your own wrapper around it.
Just native support?

TIA!!


Don Burn

unread,
Dec 23, 2009, 2:22:17 PM12/23/09
to
Why in the world would you want this? Either your driver allocated the
buffer and should know its size, or the buffer was passed to you with a
size. Any other case is bad design, for instance you should not be playing
with buffers you don't own, and you should not assume anything about the
size of a buffer passed to you beyond what the caller provides.


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

"David F." <df2...@community.nospam> wrote in message
news:56A551A3-E716-4B32...@microsoft.com...

> __________ Information from ESET NOD32 Antivirus, version of virus
> signature database 4713 (20091223) __________
>
> The message was checked by ESET NOD32 Antivirus.
>
> http://www.eset.com
>
>
>

__________ Information from ESET NOD32 Antivirus, version of virus signature database 4713 (20091223) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com


David F.

unread,
Dec 23, 2009, 4:16:21 PM12/23/09
to
realloc override without having to have #if defined(WIN_DDK_BUILD) around
sections of code that is universal.

"Don Burn" <bu...@stopspam.windrvr.com> wrote in message
news:ezH4AVAh...@TK2MSFTNGP06.phx.gbl...

Scott Noone

unread,
Dec 23, 2009, 8:03:23 PM12/23/09
to
You're on your own on this one, we don't have that kind of insight into the
pool allocator in kernel mode.

-scott

--
Scott Noone
Consulting Associate
OSR Open Systems Resources, Inc.
http://www.osronline.com


"David F." <df2...@community.nospam> wrote in message

news:36DEBF22-9060-460C...@microsoft.com...

Pavel A.

unread,
Dec 23, 2009, 8:23:05 PM12/23/09
to
"David F." <df2...@community.nospam> wrote in message
news:36DEBF22-9060-460C...@microsoft.com...

> realloc override without having to have #if defined(WIN_DDK_BUILD) around
> sections of code that is universal.

Make your own allocator, or change design.
--pa

alberto

unread,
Dec 28, 2009, 10:02:25 AM12/28/09
to

I would put my own wrapper around it, anytime. Much better to take
things in my own hands than to use some OS level hack that can
backfire when I least want it to.

Alberto.

0 new messages