Просмотр исходного кода

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

Ioannis Koutras лет назад: 13
Родитель
Сommit
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 */
+