We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8b95b9a commit d537d35Copy full SHA for d537d35
src/snmalloc/override/rust.cc
@@ -50,4 +50,10 @@ extern "C" SNMALLOC_EXPORT void SNMALLOC_NAME_MANGLE(rust_statistics)(
50
{
51
*current_memory_usage = Alloc::Config::Backend::get_current_usage();
52
*peak_memory_usage = Alloc::Config::Backend::get_peak_usage();
53
-}
+}
54
+
55
+extern "C" SNMALLOC_EXPORT size_t
56
+SNMALLOC_NAME_MANGLE(rust_usable_size)(const void* ptr)
57
+{
58
+ return ThreadAlloc::get().alloc_size(ptr);
59
0 commit comments