浏览代码

map_thread_heap() is not needed on memory space aware allocators.

Ioannis Koutras 13 年之前
父节点
当前提交
c263d553aa
共有 2 个文件被更改,包括 7 次插入0 次删除
  1. 3 0
      private-include/other.h
  2. 4 0
      src/other.c

+ 3 - 0
private-include/other.h

@@ -18,13 +18,16 @@
 #ifndef OTHER_H
 #define OTHER_H
 
+#include "dmm_config.h"
 #include <dmmlib/heap.h>
 
 size_t req_padding(size_t size);
 
 int map_size_to_list(heap_t *heap, size_t sz);
 
+#ifndef WITH_MEMORY_SPACE_AWARENESS
 int map_thread_heap(void);
+#endif /* WITH_MEMORY_SPACE_AWARENESS */
 
 #endif /* OTHER_H */
 

+ 4 - 0
src/other.c

@@ -45,8 +45,12 @@ int map_size_to_list(heap_t *heap, size_t sz) {
     return -1;
 }
 
+#ifndef WITH_MEMORY_SPACE_AWARENESS
+
 /* Random assignment */
 int map_thread_heap(void) {
     return (int) (((unsigned long) pthread_self() >> 10) % NUM_HEAPS);
 }
 
+#endif /* WITH_MEMORY_SPACE_AWARENESS */
+