Skip to content

Instantly share code, notes, and snippets.

@JJL772
Last active July 15, 2022 00:22
Show Gist options
  • Save JJL772/de1f9818a01ddf9e9ab4450d863b9f03 to your computer and use it in GitHub Desktop.
Save JJL772/de1f9818a01ddf9e9ab4450d863b9f03 to your computer and use it in GitHub Desktop.

Revisions

  1. JJL772 revised this gist Jul 15, 2022. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions mimalloc-stub.c
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,4 @@
    // Compile with: gcc -o libmimalloc-proxy.so -shared mimalloc-stub.c
    #include <stdlib.h>
    #include <stddef.h>

  2. JJL772 created this gist Jul 15, 2022.
    6 changes: 6 additions & 0 deletions mimalloc-stub.c
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    #include <stdlib.h>
    #include <stddef.h>

    void* reallocarray(void* ptr, size_t nmemb, size_t size) {
    return realloc(ptr, nmemb*size);
    }