Need Help in porting Jemalloc.
raju.sahu at gmail.com
Mon Jan 18 19:25:21 PST 2016
Please provide your valuable inputs for my below question?
On Mon, Jan 18, 2016 at 8:23 AM, RajaKishore Sahu <raju.sahu at gmail.com>
> I have a follow up question.
> We have only 40 MB of memory for our sub system.
> I start up Jemalloc is keep asking for new chunks and by the time the
> system becomes ready it almost consumes 38 MB of memory.
> How we can tell Jemalloc to uses already allocated memory chuck when we
> run out of our 40 MB of memory?
> On Tue, Oct 13, 2015 at 8:21 AM, RajaKishore Sahu <raju.sahu at gmail.com>
>> Hi Luke,
>> Thanks for sharing the details. I will go through the code and come back
>> if I need some more help.
>> Rajakishore Sahu
>> On Mon, Oct 12, 2015 at 5:09 PM, D'Alessandro, Luke K <
>> ldalessa at indiana.edu> wrote:
>>> > On Oct 12, 2015, at 1:12 AM, RajaKishore Sahu <raju.sahu at gmail.com>
>>> > Hi,
>>> > I am trying to port Jemalloc. We are going to use it for our
>>> sub-system not for the whole system.
>>> > Main system has its own memory manager. While initializing the
>>> sub-system (in boot up) we will allocate memory from main system (Ex:- 10
>>> MB) which will be contiguous memory then we want to give the start address
>>> and size to Jemalloc to manage it. Please let us know where to provide the
>>> start address to jemalloc?
>>> Hi. This dlmalloc-mspace-like interface isn’t really supported by
>>> jemalloc, which wants to be able to request “chunks” of memory from the
>>> system using a chunk allocator (typically mmap()).
>>> To do what you want you need to write a chunk provider based on [the
>>> chunk hooks class](
>>> and then install it for all of the threads in your code. Your chunk
>>> provider will have to give jemalloc chunks from your contiguous region.
>>> We do this in HPX-5 to manage a network-registered global heap. The
>>> callback chunks are [here](
>>> and the “heap” is implemented (here)[
>>> This code is slightly complex but it’s basically just using a bitmap to
>>> allocate chunks from a large contiguous heap, and can serve as an example
>>> for you.
>>> > Main system will provide thread, Mutex/Semaphore and the memory for
>>> this will not be allocated from the sub-system. In this scenario how can we
>>> enable thread caching? We do have a rapper to create threads, which means
>>> we know which are the the threads created by sub-system. Will it help in
>>> enabling the thread caching?
>>> Thread caching will likely be on by default for the threads. In more
>>> complex code where you might want to manage more than one memory space, you
>>> may need to explicitly allocate new caches.
>>> > Any help will greatly appreciated!
>>> > --
>>> > Thanx
>>> > Rajakishore Sahu
>>> > Mail:-raju.sahu at gmail.com
>>> > _______________________________________________
>>> > jemalloc-discuss mailing list
>>> > jemalloc-discuss at canonware.com
>>> > http://www.canonware.com/mailman/listinfo/jemalloc-discuss
>> Rajakishore Sahu
>> Mail:-raju.sahu at gmail.com
>> Mobile:-+91 9886719841
> Rajakishore Sahu
> Mail:-raju.sahu at gmail.com
> Mobile:-+91 9886719841
Mail:-raju.sahu at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the jemalloc-discuss