mirror of
https://github.com/servo/servo.git
synced 2025-08-26 15:48:22 +01:00
Round hashglobe allocations up to the nearest page size.
MozReview-Commit-ID: 34KFtcwCkBB
This commit is contained in:
parent
98f370130d
commit
ef042899d2
8 changed files with 29 additions and 1 deletions
|
@ -17,6 +17,7 @@ gecko_debug = ["style/gecko_debug"]
|
|||
atomic_refcell = "0.1"
|
||||
cssparser = "0.21.1"
|
||||
env_logger = {version = "0.4", default-features = false} # disable `regex` to reduce code size
|
||||
hashglobe = {path = "../../components/hashglobe"}
|
||||
libc = "0.2"
|
||||
log = {version = "0.3.5", features = ["release_max_level_info"]}
|
||||
malloc_size_of = {path = "../../components/malloc_size_of"}
|
||||
|
|
|
@ -181,6 +181,10 @@ pub extern "C" fn Servo_Initialize(dummy_url_data: *mut URLExtraData) {
|
|||
|
||||
// Initialize the dummy url data
|
||||
unsafe { DUMMY_URL_DATA = dummy_url_data; }
|
||||
|
||||
// Set the system page size.
|
||||
let page_size = unsafe { bindings::Gecko_GetSystemPageSize() };
|
||||
::hashglobe::SYSTEM_PAGE_SIZE.store(page_size, ::std::sync::atomic::Ordering::Relaxed);
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
extern crate cssparser;
|
||||
extern crate env_logger;
|
||||
extern crate hashglobe;
|
||||
extern crate libc;
|
||||
#[macro_use] extern crate log;
|
||||
extern crate malloc_size_of;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue