virtual memory and actor spawner

This commit is contained in:
madeline
2026-04-28 02:25:18 -07:00
parent 5f33489465
commit c71272af05
23 changed files with 649 additions and 53 deletions
@@ -127,6 +127,13 @@ public:
[[nodiscard]] const CMemBlock* getFreeHead() const { return mHeadFreeList; }
[[nodiscard]] CMemBlock* getUsedHead() { return mHeadUsedList; }
[[nodiscard]] const CMemBlock* getUsedHead() const { return mHeadUsedList; }
void* mVmemBase; // base of VM reservation
size_t mVmemCapacity; // total reserved bytes
size_t mVmemCommitted; // page-aligned committed bytes so far
// Commit more pages and splice them into the free list
bool growHeap(u32 needed);
#endif
};
@@ -61,6 +61,15 @@ public:
static JKRSolidHeap* create(u32, JKRHeap*, bool);
static void* getState_(TState* state) { return getState_buf_(state); }
#if TARGET_PC
void* mVmemBase; // base of VM reservation
size_t mVmemCapacity; // total reserved bytes
size_t mVmemCommitted; // page-aligned committed bytes so far
// Commit more pages and extend the free region
bool growHeap(u32 needed);
#endif
};
inline JKRSolidHeap* JKRCreateSolidHeap(u32 param_0, JKRHeap* heap, bool param_2) {