comparison runtime/fixed_alloc.h @ 67:d1569087348f

Some small optimizations
author Mike Pavone <pavone@retrodev.com>
date Mon, 07 Jun 2010 01:15:16 -0400
parents a24eb366195c
children 5a195ee08eac
comparison
equal deleted inserted replaced
66:d4b44ae2e34a 67:d1569087348f
8 #define GET_BLOCK(ptr) ((void*)(((uintptr_t)(ptr))&(~((uintptr_t)(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 64
14 14
15 #define ADJUST_SIZE(requested) (((requested)+(STRIDE-1)) & (~(STRIDE-1))) 15 #define ADJUST_SIZE(requested) (((requested)+(STRIDE-1)) & (~(STRIDE-1)))
16 16
17 17
18 #pragma pack(push,1) 18 #pragma pack(push,1)