RegionAllocTracking: Add parameter to specify a maxmimum dynamic (non-fixed) memory address. Above this address, only fixed allocations are allowed

This commit is contained in:
Jonathan Campbell
2021-10-17 14:13:38 -07:00
parent 932018299e
commit 68660a3fce
2 changed files with 64 additions and 91 deletions

View File

@@ -17,6 +17,7 @@ public:
public:
RegionAllocTracking();
public:
void setMaxDynamicAllocationAddress(Bitu _new_max);
Bitu getMemory(Bitu bytes,const char *who,Bitu alignment,Bitu must_be_at);
void initSetRange(Bitu start,Bitu end);
Bitu freeUnusedMinToLoc(Bitu phys);
@@ -29,6 +30,7 @@ public:
std::string name;
std::vector<Block> alist;
Bitu _min,_max;
Bitu _max_nonfixed; /* above this address, only permit fixed memory allocation */
bool topDownAlloc;
public:
static const Bitu alloc_failed = ~((Bitu)0);