mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
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:
commit
2ef1fd342e
1 changed files with 3 additions and 4 deletions
|
@ -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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue