#include "glib.h"
#include "gthreadprivate.h"
+
+/* Undef the macros before including galias.h */
+#undef g_malloc_n
+#undef g_malloc0_n
+#undef g_realloc_n
+#undef g_try_malloc_n
+#undef g_try_malloc0_n
+#undef g_try_realloc_n
+
#include "galias.h"
#define MEM_PROFILE_TABLE_SIZE 4096
#define SIZE_OVERFLOWS(a,b) (G_UNLIKELY ((a) > G_MAXSIZE / (b)))
-#undef g_malloc_n
gpointer
g_malloc_n (gsize n_blocks,
gsize n_block_bytes)
return g_malloc (n_blocks * n_block_bytes);
}
-#undef g_malloc0_n
gpointer
g_malloc0_n (gsize n_blocks,
gsize n_block_bytes)
return g_malloc0 (n_blocks * n_block_bytes);
}
-#undef g_realloc_n
gpointer
g_realloc_n (gpointer mem,
gsize n_blocks,
return g_realloc (mem, n_blocks * n_block_bytes);
}
-#undef g_try_malloc_n
gpointer
g_try_malloc_n (gsize n_blocks,
gsize n_block_bytes)
return g_try_malloc (n_blocks * n_block_bytes);
}
-#undef g_try_malloc0_n
gpointer
g_try_malloc0_n (gsize n_blocks,
gsize n_block_bytes)
return g_try_malloc0 (n_blocks * n_block_bytes);
}
-#undef g_try_realloc_n
gpointer
g_try_realloc_n (gpointer mem,
gsize n_blocks,