tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: malloc, thread and alignment

On Thu, Mar 26, 2015 at 02:13:19PM +0000, Emmanuel Dreyfus wrote:
> Hello
> jemmaloc(3) says:
>   Allocations are packed tightly together, which can be an issue for multi-
>   threaded applications.  If you need to assure that allocations do not
>   suffer from cache line sharing, round your allocation requests up to the
>   nearest multiple of the cache line size.
> Do we are example of how it should be done? I do not know how to discover
> cache line size, neither do I know how I can specify alignment based on it.

I don't think we export the cache line size currently. You can specify
the alignment with posix_memalign.


Home | Main Index | Thread Index | Old Index