about summary refs log tree commit diff
path: root/src/rt/rust_exchange_alloc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/rt/rust_exchange_alloc.cpp')
-rw-r--r--src/rt/rust_exchange_alloc.cpp16
1 files changed, 0 insertions, 16 deletions
diff --git a/src/rt/rust_exchange_alloc.cpp b/src/rt/rust_exchange_alloc.cpp
index 89257dc9f6e..658d97031ce 100644
--- a/src/rt/rust_exchange_alloc.cpp
+++ b/src/rt/rust_exchange_alloc.cpp
@@ -15,16 +15,10 @@
 #include <string.h>
 #include <stdio.h>
 
-extern uintptr_t rust_exchange_count;
-uintptr_t rust_exchange_count = 0;
-
 void *
 rust_exchange_alloc::malloc(size_t size) {
   void *value = ::malloc(size);
   assert(value);
-
-  sync::increment(rust_exchange_count);
-
   return value;
 }
 
@@ -37,15 +31,5 @@ rust_exchange_alloc::realloc(void *ptr, size_t size) {
 
 void
 rust_exchange_alloc::free(void *ptr) {
-  sync::decrement(rust_exchange_count);
   ::free(ptr);
 }
-
-void
-rust_check_exchange_count_on_exit() {
-  if (rust_exchange_count != 0) {
-    printf("exchange heap not empty on exit\n");
-    printf("%d dangling allocations\n", (int)rust_exchange_count);
-    abort();
-  }
-}