diff options
Diffstat (limited to 'src/rt/rust_exchange_alloc.cpp')
| -rw-r--r-- | src/rt/rust_exchange_alloc.cpp | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/rt/rust_exchange_alloc.cpp b/src/rt/rust_exchange_alloc.cpp index 6c0204ca736..a92bc4edd41 100644 --- a/src/rt/rust_exchange_alloc.cpp +++ b/src/rt/rust_exchange_alloc.cpp @@ -18,12 +18,9 @@ uintptr_t exchange_count = 0; void * -rust_exchange_alloc::malloc(size_t size, bool zero) { +rust_exchange_alloc::malloc(size_t size) { void *value = ::malloc(size); assert(value); - if (zero) { - memset(value, 0, size); - } sync::increment(exchange_count); @@ -31,11 +28,6 @@ rust_exchange_alloc::malloc(size_t size, bool zero) { } void * -rust_exchange_alloc::calloc(size_t size) { - return this->malloc(size); -} - -void * rust_exchange_alloc::realloc(void *ptr, size_t size) { void *new_ptr = ::realloc(ptr, size); assert(new_ptr); |
