Skip to content

Commit 09ed791

Browse files
committed
auto merge of #10612 : pnkfelix/rust/remove-cut-and-pasted-rt-fixme, r=pcwalton
I cannot tell whether the original comment was unsure about the arithmetic calculations, or if it was unsure about the assumptions being made about the alignment of the current allocation pointer. The arithmetic calculation looks fine to me, though. This technique is documented e.g. in Henry Warren's "Hacker's Delight" (section 3-1). (I am sure one can find it elsewhere too, its not an obscure property.)
2 parents cd9069c + 861e6f5 commit 09ed791

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

src/libstd/rt/global_heap.rs

-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ extern {
2020
#[inline]
2121
pub fn get_box_size(body_size: uint, body_align: uint) -> uint {
2222
let header_size = size_of::<raw::Box<()>>();
23-
// FIXME (#2699): This alignment calculation is suspicious. Is it right?
2423
let total_size = align_to(header_size, body_align) + body_size;
2524
total_size
2625
}

0 commit comments

Comments
 (0)