Browse Source

Added ability to replace the realloc() call with the dmmlib one.

Ioannis Koutras 13 years ago
parent
commit
394d0fb84e
1 changed files with 6 additions and 0 deletions
  1. 6 0
      include/dmmlib/custom_realloc.h

+ 6 - 0
include/dmmlib/custom_realloc.h

@@ -52,5 +52,11 @@ void * custom_ahrealloc(allocator_t *allocator, heap_t *heap, void *ptr, size_t
 void * custom_realloc(void *ptr, size_t size);
 #endif /* WITH_MEMORY_SPACE_AWARENESS */
 
+#ifdef REPLACE_MALLOC
+
+#define realloc(ptr, size) custom_ahrealloc(NULL, NULL, ptr, size)
+
+#endif /* REPLACE_MALLOC */
+
 #endif /* CUSTOM_REALLOC_H */