Explorar o código

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

Ioannis Koutras %!s(int64=13) %!d(string=hai) anos
pai
achega
394d0fb84e
Modificáronse 1 ficheiros con 6 adicións e 0 borrados
  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 */