Skip to content

Commit 549ab77

Browse files
committed
[jemalloc] set correct excess in alloc_excess
1 parent 45ef012 commit 549ab77

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/liballoc_jemalloc/lib.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,8 @@ mod contents {
203203
err: *mut u8) -> *mut u8 {
204204
let p = __rde_alloc(size, align, err);
205205
if !p.is_null() {
206-
*excess = size;
206+
let flags = align_to_flags(align);
207+
*excess = nallocx(size, flags) as usize;
207208
}
208209
return p
209210
}

0 commit comments

Comments
 (0)