Skip to content

Instantly share code, notes, and snippets.

@JJL772
Last active July 15, 2022 00:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JJL772/de1f9818a01ddf9e9ab4450d863b9f03 to your computer and use it in GitHub Desktop.
Save JJL772/de1f9818a01ddf9e9ab4450d863b9f03 to your computer and use it in GitHub Desktop.
Tiny library to override reallocarray for valgrind
// Compile with: gcc -o libmimalloc-proxy.so -shared mimalloc-stub.c
#include <stdlib.h>
#include <stddef.h>
void* reallocarray(void* ptr, size_t nmemb, size_t size) {
return realloc(ptr, nmemb*size);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment