Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Vista Drivers > Get buffer size of ExAllocatePoolWithTag

Reply
Thread Tools Display Modes

Get buffer size of ExAllocatePoolWithTag

 
 
David F.
Guest
Posts: n/a

 
      12-23-2009
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!!


 
Reply With Quote
 
 
 
 
Don Burn
Guest
Posts: n/a

 
      12-23-2009
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." <> wrote in message
news:56A551A3-E716-4B32-9E98-...
> 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!!
>
>
>
> __________ 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




 
Reply With Quote
 
David F.
Guest
Posts: n/a

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

"Don Burn" <> wrote in message
news:...
> 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." <> wrote in message
> news:56A551A3-E716-4B32-9E98-...
>> 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!!
>>
>>
>>
>> __________ 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
>
>
>
>
>


 
Reply With Quote
 
Scott Noone
Guest
Posts: n/a

 
      12-24-2009
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." <> wrote in message
news:36DEBF22-9060-460C-879F-...
> realloc override without having to have #if defined(WIN_DDK_BUILD) around
> sections of code that is universal.
>
> "Don Burn" <> wrote in message
> news:...
>> 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." <> wrote in message
>> news:56A551A3-E716-4B32-9E98-...
>>> 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!!
>>>
>>>
>>>
>>> __________ 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
>>
>>
>>
>>
>>

>

 
Reply With Quote
 
Pavel A.
Guest
Posts: n/a

 
      12-24-2009
"David F." <> wrote in message
news:36DEBF22-9060-460C-879F-...
> 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


> "Don Burn" <> wrote in message
> news:...
>> 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." <> wrote in message
>> news:56A551A3-E716-4B32-9E98-...
>>> 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!!
>>>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Output buffer in wdm driver Zaheer Khan Windows Vista Drivers 1 11-24-2009 05:00 PM
Folder Size in Size Column AaronSchell Windows Vista File Management 5 02-05-2008 09:51 PM
Audio Buffer Size Adjustment? Jeff Stephens Windows Vista Hardware 0 12-16-2007 05:40 AM
Activesync hangs on Calendar - Reproducible Error Troy Lokitz ActiveSync 5 08-15-2007 06:28 PM
ActiveSync 4.1, Calendar and "Processing" Dale Reeck ActiveSync 10 12-20-2005 12:44 AM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59