Hi,
I was wondering if anyone knew just how much memory was used when you ask
for a PAGE_SIZE using ‘ExAllocateWithTag’. Do you chew up 1 page plus 4
bytes for the tag? Or is the memory occupied by the tag part of the pool
such that you chew up 2 full pages of memory? And if I specify (PAGE_SIZE -
4) for the ‘NumberOfBytes’, is the pool page-aligned?
The documentation discusses the NumberOfBytes parameter, but doesn’t appear
to account for the tag. In fact, it looks like it was cut-n-pasted from the
‘ExAllocatePool’ documentation.
Thanks,
Larry
Technically when you use ExAllocatePool with or without tag you always get
size + 8, since there is an 8 byte pool header that includes space for the
tag.
–
The personal opinion of
Gary G. Little
“Larry Bovie” wrote in message
news:xxxxx@ntdev…
> Hi,
>
> I was wondering if anyone knew just how much memory was used when you ask
> for a PAGE_SIZE using ‘ExAllocateWithTag’. Do you chew up 1 page plus 4
> bytes for the tag? Or is the memory occupied by the tag part of the pool
> such that you chew up 2 full pages of memory? And if I specify
> (PAGE_SIZE - 4) for the ‘NumberOfBytes’, is the pool page-aligned?
>
> The documentation discusses the NumberOfBytes parameter, but doesn’t
> appear to account for the tag. In fact, it looks like it was cut-n-pasted
> from the ‘ExAllocatePool’ documentation.
>
> Thanks,
> Larry
>
>
ExAllocatePool calls ExAllocatePoolWithTag with a tag “None”
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Larry Bovie
Sent: Wednesday, November 02, 2005 6:41 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] ExAllocatePoolWithTag – NumberOfBytes vs PAGE_SIZE
Hi,
I was wondering if anyone knew just how much memory was used when you
ask for a PAGE_SIZE using ‘ExAllocateWithTag’. Do you chew up 1 page
plus 4 bytes for the tag? Or is the memory occupied by the tag part of
the pool such that you chew up 2 full pages of memory? And if I specify
(PAGE_SIZE -
4) for the ‘NumberOfBytes’, is the pool page-aligned?
The documentation discusses the NumberOfBytes parameter, but doesn’t
appear to account for the tag. In fact, it looks like it was
cut-n-pasted from the ‘ExAllocatePool’ documentation.
Thanks,
Larry
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@appstream.com To
unsubscribe send a blank email to xxxxx@lists.osr.com
> I was wondering if anyone knew just how much memory was used when you ask
for a PAGE_SIZE using ‘ExAllocateWithTag’. Do you chew up 1 page plus 4
bytes for the tag?
1 page exactly, the tag will reside in the control structures which are - for
such allocation - outside this memory.
Allocations from ExAllocateXxx are always page-aligned if >= PAGE_SIZE is
requested.
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com
> Technically when you use ExAllocatePool with or without tag you always get
size + 8, since there is an 8 byte pool header that includes space for the
tag.
Pool headers are not used for >= PAGE_SIZE allocations.
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com
You definitely don’t burn 2 pages if you ask for PAGE_SIZE. If you ask
for PAGE_SIZE+1, you will burn 2 pages though. IIRC, for PAGE_SIZE or
greater, Mm keeps a bitmap of pages that were allocated and I think it
can store the tag alongside that bitmap, but this is based off my
looking at the code in the win2k timeframe.
d
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Larry Bovie
Sent: Wednesday, November 02, 2005 6:41 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] ExAllocatePoolWithTag – NumberOfBytes vs PAGE_SIZE
Hi,
I was wondering if anyone knew just how much memory was used when you
ask
for a PAGE_SIZE using ‘ExAllocateWithTag’. Do you chew up 1 page plus 4
bytes for the tag? Or is the memory occupied by the tag part of the pool
such that you chew up 2 full pages of memory? And if I specify
(PAGE_SIZE -
4) for the ‘NumberOfBytes’, is the pool page-aligned?
The documentation discusses the NumberOfBytes parameter, but doesn’t
appear
to account for the tag. In fact, it looks like it was cut-n-pasted from
the
‘ExAllocatePool’ documentation.
Thanks,
Larry
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
With a tag "DDK " or "WDM ", depending on DDK version.
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com
----- Original Message -----
From: “Satya Das”
To: “Windows System Software Devs Interest List”
Sent: Wednesday, November 02, 2005 8:38 PM
Subject: RE: [ntdev] ExAllocatePoolWithTag – NumberOfBytes vs PAGE_SIZE
ExAllocatePool calls ExAllocatePoolWithTag with a tag “None”
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Larry Bovie
Sent: Wednesday, November 02, 2005 6:41 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] ExAllocatePoolWithTag – NumberOfBytes vs PAGE_SIZE
Hi,
I was wondering if anyone knew just how much memory was used when you
ask for a PAGE_SIZE using ‘ExAllocateWithTag’. Do you chew up 1 page
plus 4 bytes for the tag? Or is the memory occupied by the tag part of
the pool such that you chew up 2 full pages of memory? And if I specify
(PAGE_SIZE -
4) for the ‘NumberOfBytes’, is the pool page-aligned?
The documentation discusses the NumberOfBytes parameter, but doesn’t
appear to account for the tag. In fact, it looks like it was
cut-n-pasted from the ‘ExAllocatePool’ documentation.
Thanks,
Larry
—
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@appstream.com To
unsubscribe send a blank email to xxxxx@lists.osr.com
—
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com
Yes, very true … but no additional pool is allocated just because a tag is
requested since the raw allocation includes the pool header which in turn
has room for the tag. As stated by others, the pool header is obscured to
the requester, since the pointer returned points to the user requested
buffer.
–
The personal opinion of
Gary G. Little
“Maxim S. Shatskih” wrote in message
news:xxxxx@ntdev…
>> Technically when you use ExAllocatePool with or without tag you always
>> get
>> size + 8, since there is an 8 byte pool header that includes space for
>> the
>> tag.
>
> Pool headers are not used for >= PAGE_SIZE allocations.
>
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> xxxxx@storagecraft.com
> http://www.storagecraft.com
>
>
>
There is no pool headers at all for page-aligned allocations. The control
structures are out-of-band and reside somewhere else.
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com
----- Original Message -----
From: “Gary G. Little”
Newsgroups: ntdev
To: “Windows System Software Devs Interest List”
Sent: Wednesday, November 02, 2005 10:52 PM
Subject: Re:[ntdev] Re:ExAllocatePoolWithTag – NumberOfBytes vs PAGE_SIZE
> Yes, very true … but no additional pool is allocated just because a tag is
> requested since the raw allocation includes the pool header which in turn
> has room for the tag. As stated by others, the pool header is obscured to
> the requester, since the pointer returned points to the user requested
> buffer.
>
> –
> The personal opinion of
> Gary G. Little
>
> “Maxim S. Shatskih” wrote in message
> news:xxxxx@ntdev…
> >> Technically when you use ExAllocatePool with or without tag you always
> >> get
> >> size + 8, since there is an 8 byte pool header that includes space for
> >> the
> >> tag.
> >
> > Pool headers are not used for >= PAGE_SIZE allocations.
> >
> > Maxim Shatskih, Windows DDK MVP
> > StorageCraft Corporation
> > xxxxx@storagecraft.com
> > http://www.storagecraft.com
> >
> >
> >
>
>
>
> —
> 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