ptos: pool: Propagate page information and prepend header
Signed-off-by: Chloe M <chloe@mensia.org>
This commit is contained in:
@@ -64,6 +64,24 @@ typedef struct {
|
||||
POOL_SEGMENT Level[POOL_LEVEL_MAX];
|
||||
} POOL_REGION;
|
||||
|
||||
/*
|
||||
* A pool header is prepended to the start of allocated
|
||||
* memory.
|
||||
*
|
||||
* @Gran: Granularity of page bitmap
|
||||
* @BitBase: Allocation bitbase
|
||||
* @SizeBytes: Allocation size in bytes
|
||||
* @Tag: Tag assigned to allocation
|
||||
* @Page: Page we reside in
|
||||
*/
|
||||
typedef struct {
|
||||
USHORT Gran;
|
||||
UCHAR BitBase : 6;
|
||||
USIZE SizeBytes;
|
||||
ULONG Tag;
|
||||
POOL_PAGE *Page;
|
||||
} POOL_HEADER;
|
||||
|
||||
/*
|
||||
* Initialize a pool region
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user