Auto merge of #6632 - Ms2ger:unused-mut, r=jdm

Initialize info directly in get_system_heap_allocated.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6632)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2015-07-16 06:42:37 -06:00
commit 2ef1fd342e

View file

@ -375,10 +375,9 @@ mod system_reporter {
#[cfg(target_os="linux")] #[cfg(target_os="linux")]
fn get_system_heap_allocated() -> Option<usize> { fn get_system_heap_allocated() -> Option<usize> {
let mut info: struct_mallinfo; let info: struct_mallinfo = unsafe {
unsafe { mallinfo()
info = mallinfo(); };
}
// The documentation in the glibc man page makes it sound like |uordblks| // The documentation in the glibc man page makes it sound like |uordblks|
// would suffice, but that only gets the small allocations that are put in // would suffice, but that only gets the small allocations that are put in
// the brk heap. We need |hblkhd| as well to get the larger allocations // the brk heap. We need |hblkhd| as well to get the larger allocations