about summary refs log tree commit diff
path: root/src/liballoc_jemalloc
diff options
context:
space:
mode:
authorgnzlbg <gonzalobg88@gmail.com>2017-11-03 17:44:58 +0100
committergnzlbg <gonzalobg88@gmail.com>2017-11-03 17:44:58 +0100
commit549ab77e2375f07f3c425eb4c95ba31547288176 (patch)
treeedb72d65dc833095a197f067e201f726e765ea72 /src/liballoc_jemalloc
parent45ef01269936c6b0c02fc5c212a5cea632884b69 (diff)
downloadrust-549ab77e2375f07f3c425eb4c95ba31547288176.tar.gz
rust-549ab77e2375f07f3c425eb4c95ba31547288176.zip
[jemalloc] set correct excess in alloc_excess
Diffstat (limited to 'src/liballoc_jemalloc')
-rw-r--r--src/liballoc_jemalloc/lib.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/liballoc_jemalloc/lib.rs b/src/liballoc_jemalloc/lib.rs
index 6c787198d36..bc2ed1f9c45 100644
--- a/src/liballoc_jemalloc/lib.rs
+++ b/src/liballoc_jemalloc/lib.rs
@@ -203,7 +203,8 @@ mod contents {
                                             err: *mut u8) -> *mut u8 {
         let p = __rde_alloc(size, align, err);
         if !p.is_null() {
-            *excess = size;
+            let flags = align_to_flags(align);
+            *excess = nallocx(size, flags) as usize;
         }
         return p
     }