Mercurial > repos > rhope
comparison 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 |
comparison
equal
deleted
inserted
replaced
47:6202b866d72c | 48:a24eb366195c |
---|---|
3 | 3 |
4 #include <stddef.h> | 4 #include <stddef.h> |
5 #include "plat_types.h" | 5 #include "plat_types.h" |
6 #include "block_alloc.h" | 6 #include "block_alloc.h" |
7 | 7 |
8 #define GET_BLOCK(ptr) ((void*)(((uint32_t)(ptr))&(~(BLOCK_SIZE-1)))) | 8 #define GET_BLOCK(ptr) ((void*)(((uintptr_t)(ptr))&(~((uintptr_t)(BLOCK_SIZE-1))))) |
9 | 9 |
10 #define MAX_SIZE (BLOCK_SIZE/32) | 10 #define MAX_SIZE (BLOCK_SIZE/32) |
11 #define STRIDE (BLOCK_SIZE/1024) | 11 #define STRIDE (BLOCK_SIZE/1024) |
12 #define MIN_SIZE (BLOCK_SIZE/1024) | 12 #define MIN_SIZE (BLOCK_SIZE/1024) |
13 #define MAX_FREE 16 | 13 #define MAX_FREE 16 |