Round hashglobe allocations up to the nearest page size.

MozReview-Commit-ID: 34KFtcwCkBB
This commit is contained in:
Bobby Holley 2017-09-26 20:57:20 -07:00
parent 98f370130d
commit ef042899d2
8 changed files with 29 additions and 1 deletions

View file

@ -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"}

View file

@ -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]

View file

@ -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;