tech-userlevel archive

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

malloc, thread and alignment


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.

Emmanuel Dreyfus

Home | Main Index | Thread Index | Old Index