]> git.lizzy.rs Git - rust.git/commit
Make MIN_ALIGN a const to allow better optimization
authorBjörn Steinbrink <bsteinbr@gmail.com>
Fri, 24 Oct 2014 09:08:42 +0000 (11:08 +0200)
committerDaniel Micay <danielmicay@gmail.com>
Sat, 25 Oct 2014 16:33:27 +0000 (12:33 -0400)
commit6c18e508f10aa5bf42dc80691654b9cde2a661cd
tree12153d93343fbcbdc537b2e063af557dc08727bc
parenta10917a6a9b087d10ac4fd0186b719218627281e
Make MIN_ALIGN a const to allow better optimization

With MIN_ALIGN as a static, other crates don't have access to its value
at compile time, because it is an extern global. That means that the
checks against it can't be optimized out, which is rather unfortunate.
So let's make it a constant instead.
src/liballoc/heap.rs