[PATCH] D42030: [WebAssembly] Define __heap_base global

Nicholas Wilson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 17 09:20:52 PST 2018


ncw added a comment.

In fact, I wonder now as I re-do the calculations if I shouldn't in fact use 16KiB page size (reducing wastage to 10% for 129KiB allocations, at the expense of having a 16KiB mmap bitmap.)

(Some extra detail: to avoid fragmentation I guess, and an unbounded number of "pools", malloc does direct mmap allocation for all malloced regions above ~120KiB. So for sizes above that, you can't rely on malloc to be trimming the regions and re-using them for smaller allocations in its free-bins. Any wastage from the mmap call is just a sunk cost.)


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D42030





More information about the llvm-commits mailing list