about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorFelix S. Klock II <pnkfelix@pnkfx.org>2013-11-22 18:00:21 +0100
committerFelix S. Klock II <pnkfelix@pnkfx.org>2013-11-22 18:00:21 +0100
commit861e6f5cd26b4a568d64d78ec85f3e67ab2eea7b (patch)
treea220a07429d647b93de6ad6238dd82cb0d09f672 /src/libstd
parent747213a280ac5505e2537952f1d28efceda0bfcc (diff)
downloadrust-861e6f5cd26b4a568d64d78ec85f3e67ab2eea7b.tar.gz
rust-861e6f5cd26b4a568d64d78ec85f3e67ab2eea7b.zip
The original fixme #2699 was removed back in PR #6053.
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.)
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/rt/global_heap.rs1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/libstd/rt/global_heap.rs b/src/libstd/rt/global_heap.rs
index c6e2724b0f2..08d111da351 100644
--- a/src/libstd/rt/global_heap.rs
+++ b/src/libstd/rt/global_heap.rs
@@ -20,7 +20,6 @@ extern {
 #[inline]
 pub fn get_box_size(body_size: uint, body_align: uint) -> uint {
     let header_size = size_of::<raw::Box<()>>();
-    // FIXME (#2699): This alignment calculation is suspicious. Is it right?
     let total_size = align_to(header_size, body_align) + body_size;
     total_size
 }