make arena extent allocator more flexible
Summary:
Previously we create two arenas, each having its own address range and is bump allocated when feeding pages to jemalloc. This diff rewrites the extent hooks and make it more flexible in two ways:
(1) allow bump allocation from both ends of the range, so that cold and hot data can be split easily.
(2) allow a M:N relation between arenas and address ranges, rather than the old 1:1 mapping; this makes it possible to split the low arena into two in a later diff, because some data are preferably allocated in lower 2G address space to allow the offset to be folded in the TC.
This diff doesn't really create more arenas or separate hot/cold data, but enables future diffs to do so easily.
Reviewed By: markw65
Differential Revision:
D14869230
fbshipit-source-id:
3db3286d6552848dfe4158d2a7d2fd7be0ebc4a3