Re: Pool allocation question
- From: "Maxim S. Shatskih" <maxim@xxxxxxxxxxxxxxxx>
- Date: Sat, 2 Apr 2005 10:41:44 +0400
> When ExAllocatePoolWithTag allocates less than a page, it stores size of the
block and
>the tag somewhere.
> Does it prepend a header to the block?
Yes. 2 32bit words IIRC, second of them is tag. First of them is 4 bytes, which
are the logarithm of the allocation size, logarithm of the allocation size of
the previous block, and kind of pool - paged/nonpaged.
> The documentation says that allocations >= page size are aligned on page
size.
Yes. In this case, ExAllocatePoolWithTag is a wrapper around
MiAllocatePoolPages.
> If so, where is the header in this case?
No header is needed in this case. For nonpaged base pool (the one in contiguous
512M region), the things are kept in the PFN descriptor. For nonpaged extension
pool and paged pool, the things are kept IIRC in some special bitmap which
holds the allocation info for the pool address ranges. Probably the bits in PTE
itself are used too.
--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@xxxxxxxxxxxxxxxx
http://www.storagecraft.com
.
- Follow-Ups:
- Re: Pool allocation question
- From: Pavel A.
- Re: Pool allocation question
- From: Calvin Guan
- Re: Pool allocation question
- References:
- Pool allocation question
- From: Pavel A.
- Pool allocation question
- Prev by Date: Re: CRT section Error!
- Next by Date: Re: Pool allocation question
- Previous by thread: Pool allocation question
- Next by thread: Re: Pool allocation question
- Index(es):
Relevant Pages
|