enable initial lazy commit and optional decommit to reduce commit charge with many threads

This commit is contained in:
daan 2019-08-24 15:00:55 -07:00
parent 612b2cc9b7
commit 6f5492cef8
6 changed files with 125 additions and 46 deletions

View file

@ -191,6 +191,11 @@ static inline uintptr_t _mi_align_up(uintptr_t sz, size_t alignment) {
}
}
static inline uintptr_t _mi_align_down(uintptr_t sz, size_t alignment) {
return (sz / alignment) * alignment;
}
// Align a byte size to a size in _machine words_,
// i.e. byte size == `wsize*sizeof(void*)`.
static inline size_t _mi_wsize_from_size(size_t size) {