[Zion] Add released User Stacks to pool for reuse.
This commit is contained in:
parent
d1ace374b6
commit
7695396980
3 changed files with 19 additions and 11 deletions
|
|
@ -1,7 +1,10 @@
|
|||
#pragma once
|
||||
|
||||
#include <glacier/container/linked_list.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "memory/constants.h"
|
||||
|
||||
// Per-process class to manage user stacks.
|
||||
//
|
||||
// User stacks live at
|
||||
|
|
@ -24,10 +27,7 @@ class UserStackManager {
|
|||
bool IsValidStack(uint64_t vaddr);
|
||||
|
||||
private:
|
||||
const uint64_t kStackMax = 0x00008000'00000000;
|
||||
const uint64_t kStackMin = 0x00007FF0'00000000;
|
||||
const uint64_t kStackSize = 0x100000;
|
||||
uint64_t next_stack_ = kUserStackMax;
|
||||
|
||||
uint64_t next_stack_ = kStackMax;
|
||||
uint64_t freed_stacks_ = 0;
|
||||
glcr::LinkedList<uint64_t> freed_stacks_;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue