@@ -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 */
@@ -45,8 +45,12 @@ int map_size_to_list(heap_t *heap, size_t sz) {
return -1;
}
+
/* Random assignment */
int map_thread_heap(void) {
return (int) (((unsigned long) pthread_self() >> 10) % NUM_HEAPS);