aboutsummaryrefslogtreecommitdiffstats
path: root/components/allocator/lib.rs
diff options
context:
space:
mode:
authorSamson <16504129+sagudev@users.noreply.github.com>2023-09-11 21:16:54 +0200
committerGitHub <noreply@github.com>2023-09-11 19:16:54 +0000
commitaad2dccc9c9f6b89922c07933cfa7087a8cd1ec4 (patch)
tree68dec1a9d53f4ed564843a9580fba70bf90dbef1 /components/allocator/lib.rs
parent413da4ca69d3013528c09bbaf38629a72384372d (diff)
downloadservo-aad2dccc9c9f6b89922c07933cfa7087a8cd1ec4.tar.gz
servo-aad2dccc9c9f6b89922c07933cfa7087a8cd1ec4.zip
Strict import formatting (grouping and granularity) (#30325)
* strict imports formatting * Reformat all imports
Diffstat (limited to 'components/allocator/lib.rs')
-rw-r--r--components/allocator/lib.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/components/allocator/lib.rs b/components/allocator/lib.rs
index 45a535a6e41..826ce6e8aed 100644
--- a/components/allocator/lib.rs
+++ b/components/allocator/lib.rs
@@ -7,17 +7,18 @@
#[global_allocator]
static ALLOC: Allocator = Allocator;
-pub use crate::platform::*;
-
#[cfg(not(windows))]
pub use jemalloc_sys;
+pub use crate::platform::*;
+
#[cfg(not(windows))]
mod platform {
- use jemalloc_sys as ffi;
use std::alloc::{GlobalAlloc, Layout};
use std::os::raw::{c_int, c_void};
+ use jemalloc_sys as ffi;
+
/// Get the size of a heap block.
pub unsafe extern "C" fn usable_size(ptr: *const c_void) -> usize {
ffi::malloc_usable_size(ptr as *const _)
@@ -100,6 +101,7 @@ mod platform {
mod platform {
pub use std::alloc::System as Allocator;
use std::os::raw::c_void;
+
use winapi::um::heapapi::{GetProcessHeap, HeapSize, HeapValidate};
/// Get the size of a heap block.