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

shireesh bhat shireeshbhat at yahoo.co.in
Thu Jul 17 11:28:11 PDT 2014


Hi Jason,

Even if I find out the page's offset how do I find the address of arena_run_t, since I just know the mapping information for every page which is present in arena_chunk_t.


Regards,
Shireesh



On Thursday, 17 July 2014 1:33 PM, Jason Evans <jasone at canonware.com> wrote:
 


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/20140718/892b2ce2/attachment-0001.html>


More information about the jemalloc-discuss mailing list