auto merge of #4938 : thestinger/rust/no_zero, r=brson

I removed the unused wrappers methods named `calloc` because they relied on the malloc wrapper having a `bool zero = true` default parameter (which resulted in some accidental zeroing). Perhaps wrapping the actual calloc function would be useful, but I don't know of an existing use case that could use it so I just removed these.

This gives an ~1% performance improvement for TreeMap, which does a lot of small allocations. Vectors use `realloc` which didn't zero before these changes so there's no measurable change in performance.
This commit is contained in:
bors 2013-02-14 18:27:54 -08:00
commit 20fd0c53ed
10 changed files with 12 additions and 44 deletions

View file

@ -79,11 +79,6 @@ rust_kernel::malloc(size_t size, const char *tag) {
return exchange_alloc.malloc(size);
}
void *
rust_kernel::calloc(size_t size, const char *tag) {
return exchange_alloc.calloc(size);
}
void *
rust_kernel::realloc(void *mem, size_t size) {
return exchange_alloc.realloc(mem, size);