32#ifndef __MEM_POOL_HH__
33#define __MEM_POOL_HH__
Defines global host-dependent types: Counter, Tick, and (indirectly) {int,uint}{8,...
Class for handling allocation of physical pages in SE mode.
void setFreePage(Counter value)
Counter totalPages() const
void serialize(CheckpointOut &cp) const override
Serialize an object.
Addr freePageAddr() const
Counter _totalPages
The size of the pool, in number of pages.
Counter allocatedPages() const
Counter startPageNum
Start page of pool.
Addr allocatedBytes() const
Counter startPage() const
Addr allocate(Addr npages)
Counter freePages() const
Counter freePageNum
Page number of free memory.
void unserialize(CheckpointIn &cp) override
Unserialize an object.
Addr allocPhysPages(int npages, int pool_id=0)
Allocate npages contiguous unused physical pages.
void serialize(CheckpointOut &cp) const override
Serialize an object.
void populate(const AddrRangeList &memories)
Addr freeMemSize(int pool_id=0) const
Amount of physical memory that is still free in a pool.
std::vector< MemPool > pools
Addr memSize(int pool_id=0) const
Amount of physical memory that exists in a pool.
void unserialize(CheckpointIn &cp) override
Unserialize an object.
MemPools(Addr page_shift)
Basic support for object serialization.
BitfieldType< SegDescriptorLimit > limit
double Counter
All counters are of 64-bit values.
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
std::ostream CheckpointOut
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.