[Zion] Free memory that was allocated with the slab allocator.
This reduces the number of active allocs by ~ 200. Size 8: 142 -> 2 Size 16: 319 > 313 Size 32: 364-> 312
This commit is contained in:
parent
6d27ee5dc5
commit
659f122c9e
6 changed files with 50 additions and 15 deletions
|
|
@ -3,11 +3,12 @@
|
|||
#include <glacier/memory/unique_ptr.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "memory/constants.h"
|
||||
#include "memory/slab_allocator.h"
|
||||
|
||||
class KernelHeap {
|
||||
public:
|
||||
KernelHeap(uint64_t lower_bound, uint64_t upper_bound);
|
||||
KernelHeap();
|
||||
void InitializeSlabAllocators();
|
||||
|
||||
void* Allocate(uint64_t size);
|
||||
|
|
@ -17,8 +18,8 @@ class KernelHeap {
|
|||
static void DumpDebugData();
|
||||
|
||||
private:
|
||||
uint64_t next_addr_;
|
||||
uint64_t upper_bound_;
|
||||
uint64_t next_addr_ = kKernelBuddyHeapStart;
|
||||
uint64_t upper_bound_ = kKernelBuddyHeapEnd;
|
||||
|
||||
uint64_t alloc_count_ = 0;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue