diff runtime/fixed_alloc.h @ 48:a24eb366195c

Fixed some bugs introduced in previous commit and moved definition of integer methods out of runtime and into the compiler
author Mike Pavone <pavone@retrodev.com>
date Tue, 02 Mar 2010 00:18:49 -0500
parents 1b86a1ee500a
children d1569087348f
line wrap: on
line diff
--- a/runtime/fixed_alloc.h	Tue Dec 22 01:22:09 2009 -0500
+++ b/runtime/fixed_alloc.h	Tue Mar 02 00:18:49 2010 -0500
@@ -5,7 +5,7 @@
 #include "plat_types.h"
 #include "block_alloc.h"
 
-#define GET_BLOCK(ptr) ((void*)(((uint32_t)(ptr))&(~(BLOCK_SIZE-1))))
+#define GET_BLOCK(ptr) ((void*)(((uintptr_t)(ptr))&(~((uintptr_t)(BLOCK_SIZE-1)))))
 
 #define MAX_SIZE   (BLOCK_SIZE/32)
 #define STRIDE     (BLOCK_SIZE/1024)