Created
March 9, 2011 02:25
-
-
Save erik/861571 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/metodo/i386/hal/mm/memory.c b/src/metodo/i386/hal/mm/memory.c | |
index 714143a..1315126 100644 | |
--- a/src/metodo/i386/hal/mm/memory.c | |
+++ b/src/metodo/i386/hal/mm/memory.c | |
@@ -13,7 +13,7 @@ void *kmalloc_int(unsigned int size, unsigned int flags) | |
// Initialize if needed. | |
if (placement == 0) | |
- placement = end; | |
+ placement = (unsigned)&end; | |
// Align on a page if needed. | |
/* The following line was this, but meteger said to invert the bitmask in the check: | |
@@ -27,7 +27,7 @@ void *kmalloc_int(unsigned int size, unsigned int flags) | |
// Return the address of allocation and increment the next placement address to whatever. | |
tmp = placement; | |
placement += size; | |
- return (void*) placement; | |
+ return (void*) tmp; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment