Add to rust surface standard C style API (#290)
The existing snmalloc Rust surface only exposes the calls required by the Rust global allocator. As Rust knows the size of objects it provides those to the allocator, which snmalloc takes advantage of. This PR, exposes the standard C API for allocation as well with the prefix `sn_`, so that unsafe code can potentially take advantage of using the same allocator.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
#include "../mem/slowalloc.h"
|
||||
#include "../snmalloc.h"
|
||||
#define SNMALLOC_NAME_MANGLE(a) sn_##a
|
||||
#include "malloc.cc"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user