snmalloc-sys 0.7.4

rust raw bindings of snmalloc.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
#include "malloc-extensions.h"

#include "../snmalloc.h"

using namespace snmalloc;

void get_malloc_info_v1(malloc_info_v1* stats)
{
  auto curr = Alloc::Config::Backend::get_current_usage();
  auto peak = Alloc::Config::Backend::get_peak_usage();
  stats->current_memory_usage = curr;
  stats->peak_memory_usage = peak;
}