Skip to content

Commit 2e06147

Browse files
committed
get rid of unused exchange_alloc calloc method
this isn't actually calloc - it calls the malloc wrapper which no longer zeroes
1 parent f2f4edd commit 2e06147

File tree

4 files changed

+0
-12
lines changed

4 files changed

+0
-12
lines changed

src/rt/rust_exchange_alloc.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,6 @@ rust_exchange_alloc::malloc(size_t size) {
2727
return value;
2828
}
2929

30-
void *
31-
rust_exchange_alloc::calloc(size_t size) {
32-
return this->malloc(size);
33-
}
34-
3530
void *
3631
rust_exchange_alloc::realloc(void *ptr, size_t size) {
3732
void *new_ptr = ::realloc(ptr, size);

src/rt/rust_exchange_alloc.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
class rust_exchange_alloc {
1818
public:
1919
void *malloc(size_t size);
20-
void *calloc(size_t size);
2120
void *realloc(void *mem, size_t size);
2221
void free(void *mem);
2322
};

src/rt/rust_kernel.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,6 @@ rust_kernel::malloc(size_t size, const char *tag) {
7979
return exchange_alloc.malloc(size);
8080
}
8181

82-
void *
83-
rust_kernel::calloc(size_t size, const char *tag) {
84-
return exchange_alloc.calloc(size);
85-
}
86-
8782
void *
8883
rust_kernel::realloc(void *mem, size_t size) {
8984
return exchange_alloc.realloc(mem, size);

src/rt/rust_kernel.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,6 @@ class rust_kernel {
133133
void fatal(char const *fmt, ...);
134134

135135
void *malloc(size_t size, const char *tag);
136-
void *calloc(size_t size, const char *tag);
137136
void *realloc(void *mem, size_t size);
138137
void free(void *mem);
139138
rust_exchange_alloc *region() { return &exchange_alloc; }

0 commit comments

Comments
 (0)