Jemalloc Porting

vijay bhatt veejppee at gmail.com
Sun Jan 17 22:37:31 PST 2016


Hi,

I am studying jemalloc design so that this design can be used in
server based application. Please provide some initial references
related to metadata management of each memory allocation of any size
in jemalloc.

1.  Is it possible to move the metadata allocation (Internal data
structures for each arena a1, a2 .... narenas) from single arena "a0"?
Example:
I have two memory chunks (A & B )or blocks of size  1GB each. One
memory chunk A is used to hold metadata information (excluding chunk
headers) for each memory request done from memory block B. If memory
chunk A cant be able to hold more metadata then  a new memory block of
same size 1 GB  is allocated (A1, A2........ An') and same is for B
which will
Whether this strategy will work, if arena a0 will be used to hold
metadata requests and all the other to serve memory requests. I am
also finding out another solution but still not sure whether it works
or not, Please see some description.

For every Arena allocate two different chunks one to hold metadata
information of small size requests and large size requests are already
maintained in tree.

2.  Please provide some more details or references related to size
class implementation, If  user want to customize the size class
granularity to 1MB, 2MB instead of bytes, KB's what other factors need
to consider during customization.

3. Is it possible to maintain chunk header separately instead of start
of chunk?.

Please correct me if there is any gap in understanding the design of
jemalloc and feasibility to club jemalloc with server application.

Thanks & Regards,
Vijay K Bhatt

On Wed, Jan 6, 2016 at 2:33 PM, vijay bhatt <veejppee at gmail.com> wrote:
> Hi,
>
> I have requirement to setup jemalloc for application, the
> specification is as follows:
>
> 1   Allocations  (small, large ) is in terms of MB (2MB, 4MB, .........)
>
> 2.  Allocations are always aligned to 2MB granularity
> 3.  System Page size considered as 2MB (Linux Huge PAGE)
> 4.  No request comes for allocation size less than 2MB, if such
> request comes then application will round up the size to 2Mb
> granularity
>
> Please provide how to do port jemalloc for such configuration, I want
> to avail jemalloc (small, large) size class  also for above
> requirement such that
> - small size will range from : 2MB, 4MB, 8MB ....... to 16MB
> - large size class ranges from 32MB, 64MB, 128 MB
> There is no intermediate allocation size i.e (3MB, 5MB etc )
>
> Thanks & Regards,
> Vijay  Bhatt



-- 
Vijay Kumar Bhatt


More information about the jemalloc-discuss mailing list