瀏覽代碼

Moved NUM_HEAPS and MIN_FRAG_THRESHOLD to dmm_config.h. NUM_HEAPS has a variable now in CMake, for P2012 it is set to 0.

Ioannis Koutras 13 年之前
父節點
當前提交
1547eef1aa
共有 3 個文件被更改,包括 9 次插入5 次删除
  1. 2 0
      DefineOptions.cmake
  2. 7 0
      dmm_config.h.in
  3. 0 5
      include/dmmlib/heap.h

+ 2 - 0
DefineOptions.cmake

@@ -2,6 +2,7 @@ option(HAVE_LOCKS "Build with POSIX locking mechanisms" ON)
 option(WITH_EXAMPLES "Build with examples" OFF)
 option(WITH_MEMORY_SPACE_AWARENESS "Build with memory space awareness" OFF)
 option(WITH_STATIC_LIB "Build with a static library" OFF)
+set(NUM_HEAPS '0')
 
 option(P2012 "Build for P2012 runtime" OFF)
 
@@ -9,5 +10,6 @@ if (P2012)
   set(HAVE_LOCKS OFF)
   set(WITH_MEMORY_SPACE_AWARENESS ON)
   set(WITH_STATIC_LIB ON)
+  set(NUM_HEAPS '0')
 endif (P2012)
 

+ 7 - 0
dmm_config.h.in

@@ -4,5 +4,12 @@
 #cmakedefine HAVE_LOCKS
 #cmakedefine WITH_MEMORY_SPACE_AWARENESS
 
+/**
+ * \brief The number of the heaps.
+ */
+#cmakedefine NUM_HEAPS @NUM_HEAPS@
+
+#define MIN_FRAG_THRESHOLD 0.05
+
 #endif /* DMM_CONFIG_H */
 

+ 0 - 5
include/dmmlib/heap.h

@@ -17,12 +17,7 @@
 #include <pthread.h>
 #endif /* HAVE_LOCKS */
 
-/**
- * \brief The number of the heaps.
- */
-#define NUM_HEAPS 4
 
-#define MIN_FRAG_THRESHOLD 0.05
 
 typedef uint8_t knob_state_t;