From 4cab9cdad95aba4934b22872c94e44fab759250c Mon Sep 17 00:00:00 2001 From: Alexis211 Date: Mon, 26 Oct 2009 14:56:28 +0100 Subject: Some changes... --- Source/Kernel/MemoryManager/Mem.ns.cpp | 8 ++++---- Source/Kernel/MemoryManager/Mem.ns.h | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'Source/Kernel/MemoryManager') diff --git a/Source/Kernel/MemoryManager/Mem.ns.cpp b/Source/Kernel/MemoryManager/Mem.ns.cpp index 144b9f3..a0809b0 100644 --- a/Source/Kernel/MemoryManager/Mem.ns.cpp +++ b/Source/Kernel/MemoryManager/Mem.ns.cpp @@ -6,12 +6,12 @@ namespace Mem { bool pagingEnabled = false; -u32int placementAddress; +size_t placementAddress; Heap kheap; //Placement malloc, used while heap is not initialized -void *kallocInternal(u32int sz, bool align) { +void *kallocInternal(size_t sz, bool align) { if (kheap.usable()) return 0; if (align && (placementAddress & 0xFFFFF000)) { placementAddress &= 0xFFFFF000; @@ -40,7 +40,7 @@ void createHeap() { kheap.create(heapStart, heapSize, heapIndexSize, kernelPageDirectory, false, false); } -void *alloc(u32int sz, bool align) { +void *alloc(size_t sz, bool align) { if (!kheap.usable()) return kallocInternal(sz, align); if (align) return 0; @@ -51,7 +51,7 @@ void free(void *ptr) { kheap.free(ptr); } -void* mkXchgSpace(u32int sz) { +void* mkXchgSpace(size_t sz) { return Task::currThread()->mkXchgSpace(sz); } diff --git a/Source/Kernel/MemoryManager/Mem.ns.h b/Source/Kernel/MemoryManager/Mem.ns.h index b06ab79..f6094cc 100644 --- a/Source/Kernel/MemoryManager/Mem.ns.h +++ b/Source/Kernel/MemoryManager/Mem.ns.h @@ -5,13 +5,13 @@ namespace Mem { extern bool pagingEnabled; - extern u32int placementAddress; + extern size_t placementAddress; void createHeap(); - void *alloc(u32int sz, bool align = false); + void *alloc(size_t sz, bool align = false); void free(void *ptr); - void* mkXchgSpace(u32int sz); //This creates a space between userland and kernel land where data can be exchanged + void* mkXchgSpace(size_t sz); //This creates a space between userland and kernel land where data can be exchanged u32int kheapSize(), kheapFree(); } -- cgit v1.2.3