Extracting the starting address of the arena_run_t from the mapping information present in arena_chunk_t for each page

Jason Evans jasone at canonware.com
Thu Jul 17 10:33:01 PDT 2014


On Jul 17, 2014, at 8:54 AM, shireesh bhat <shireeshbhat at yahoo.co.in> wrote:
> I want to extract the starting address of the arena_run_t from the mapping information present in arena_chunk_t for each page.
> Suppose I know the starting address of one of the chunks and have retrieved the mapping information for a particular page from the 'map' structure inside arena_chunk_t, is it possible for me to retrieve the address of arena_run_t to which the page belongs?

As currently implemented, the arena_run_t data structure is embedded at offset 0 within the run itself, so as long as you know the page's offset from the beginning of the run (which is recorded in the chunk's page map), you can directly compute the (arena_run_t *).

Jason

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jemalloc.net/mailman/jemalloc-discuss/attachments/20140717/8c14eec5/attachment.html>


More information about the jemalloc-discuss mailing list