comparison runtime/fixed_alloc.h @ 63:04baa003de5a

Merged latest changes with better C branch
author Mike Pavone <pavone@retrodev.com>
date Wed, 05 May 2010 22:12:23 -0400
parents a24eb366195c
children d1569087348f
comparison
equal deleted inserted replaced
62:b218af069da7 63:04baa003de5a
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