pantry/projects/jemalloc.net/test.c
Andrew 3de2fce436
jemalloc.net (#1905)
* Create package.yml

* Create test.c

* concurrency issues on install

---------

Co-authored-by: Jacob Heider <jacob@tea.xyz>
2023-05-08 13:58:54 -04:00

14 lines
269 B
C

#include <stdlib.h>
#include <jemalloc/jemalloc.h>
int main(void) {
for (size_t i = 0; i < 1000; i++) {
// Leak some memory
malloc(i * 100);
}
// Dump allocator statistics to stderr
malloc_stats_print(NULL, NULL, NULL);
}