summaryrefslogtreecommitdiff
path: root/Source/Kernel/MemoryManager/Mem.ns.cpp
diff options
context:
space:
mode:
authorAlexis211 <alexis211@gmail.com>2009-08-31 12:35:14 +0200
committerAlexis211 <alexis211@gmail.com>2009-08-31 12:35:14 +0200
commit6bf215215e1ebaa9613b51500031e6963c12d33b (patch)
tree42c2aea12b4976e06146da5ea9a9d83d28a4d176 /Source/Kernel/MemoryManager/Mem.ns.cpp
parent68a8fb4e3b3e9087904b17ce6d81983950b9dca9 (diff)
downloadMelon-6bf215215e1ebaa9613b51500031e6963c12d33b.tar.gz
Melon-6bf215215e1ebaa9613b51500031e6963c12d33b.zip
Added a few commands to built-in shell, and made a few scrshots.
Diffstat (limited to 'Source/Kernel/MemoryManager/Mem.ns.cpp')
-rw-r--r--Source/Kernel/MemoryManager/Mem.ns.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/Kernel/MemoryManager/Mem.ns.cpp b/Source/Kernel/MemoryManager/Mem.ns.cpp
index 1d1288e..5d30f5f 100644
--- a/Source/Kernel/MemoryManager/Mem.ns.cpp
+++ b/Source/Kernel/MemoryManager/Mem.ns.cpp
@@ -142,6 +142,7 @@ void expandHeap(u32int quantity) {
}
heapEnd = newEnd;
+ kheapFree += quantity;
}
void contractHeap() { //Automatically work out how much we can contract
@@ -156,6 +157,7 @@ void contractHeap() { //Automatically work out how much we can contract
if (quantity == 0) return;
u32int newEnd = heapEnd - quantity;
+ kheapFree -= quantity;
removeFromHeapIndex(last_header);
last_header->size -= quantity;
@@ -256,4 +258,8 @@ void kfree(void *ptr) {
}
}
+u32int kheapSize() {
+ return (heapEnd - heapStart);
+}
+
}