diff runtime/fixed_alloc.h @ 95:f4fd8962c385

Cleaned up binary trees benchmark, made memory allocator somewhat configurable at compile time
author Mike Pavone <pavone@retrodev.com>
date Mon, 02 Aug 2010 01:55:56 -0400
parents e73a93fb5de1
children 43cc42df26cc
line wrap: on
line diff
--- a/runtime/fixed_alloc.h	Mon Aug 02 01:00:37 2010 -0400
+++ b/runtime/fixed_alloc.h	Mon Aug 02 01:55:56 2010 -0400
@@ -8,9 +8,15 @@
 #define GET_BLOCK(ptr) ((void*)(((uintptr_t)(ptr))&(~((uintptr_t)(BLOCK_SIZE-1)))))
 
 #define MAX_SIZE   (BLOCK_SIZE/32)
+#ifndef STRIDE
 #define STRIDE     (BLOCK_SIZE/1024)
+#endif
+#ifndef MIN_SIZE
 #define MIN_SIZE   (BLOCK_SIZE/1024)
+#endif
+#ifndef MAX_FREE
 #define MAX_FREE   64
+#endif
 
 #define ADJUST_SIZE(requested) (((requested)+(STRIDE-1)) & (~(STRIDE-1)))