Kamora khefu ea lilemo tse ka bang 'ne (sheba "ntho e 'ngoe le e 'ngoe ea jemalloc») ho lokollwa ha 5.3.1 ya moabi ho etsahetse jemalloc – ho kenngwa tshebetsong ha malloc(3) e totobatsang thibelo ya ho arohana le tshehetso bakeng sa ho lekana ha tjhelete ho ka atoloswang.
Tokollo e ncha e kenyelletsa mesebetsi e fetang 390 e nang le litokiso tsa liphoso, likarolo tse ncha, ntlafatso ea ts'ebetso, le ntlafatso ea ho nkeha habonolo.
Morero o ngotsoe ka C mme o ajoa tlasa laesense ya BSD.
Menyetla e mecha:
- tšehetso ea pvalloc(3).
- ho fumanoa mahala habeli mohahong oa debug;
- Ho ekelitsoe khetho ea ho kopanya ea --enable-pageid ho nolofalletsa tlhaloso e nang le 'mapa oa memori.
- Ho ekelitsoe paramethara ea nako ea ho sebetsa prof_bt_max ho laola botebo bo phahameng ka ho fetisisa ba stack bakeng sa ho profaela;
- Ho ekelitsoe khetho ea ho kopanya --enable-force-getenv ho sebelisa getenv ho fapana le secure_getenv;
- Ho ekelitsoe khetho ea ho kopanya ea --disable-dss ho tima ts'ebeliso ea sbrk(2);
- Ho ekelitsoe khetho ea ho kopanya tcache_ncached_max ho laola palo ea lintho tse ka har'a cache ea khoele.
- Ho ekelitsoe paramethara ea nako ea ho sebetsa calloc_madvise_threshold ho fumana hore na kernel kapa memset e sebelisitsoe ho hlakola li-block tsa memori tse abetsoeng ha ho letsoa calloc;
- E kentse khetho ea --disable-user-config compile-time ho tima ho bala litlhophiso ho tsoa faeleng ea /etc/malloc.conf kapa ho tsoa ho phetoho ea tikoloho ea MALLOC_CONF nakong ea ts'ebetso.
- E kentse paramethara ea nako ea ho sebetsa disable_large_size_classes ho nolofalletsa algorithm e ncha e fumanehang ea palo ea boholo, e fokotsang litšenyehelo tsa memori ha ho ajoa li-block tse kholo tsa memori, ke hore, ka boholo >= 4 * PAGE;
- E nolofalitse tšebeliso ea process_madvise mme ea eketsa paramethara ea nako ea ho sebetsa process_madvise_max_batch ho laola palo e phahameng ka ho fetisisa ea libaka tsa memori ho "batch" e 'ngoe le e 'ngoe ea madvise;
- li-interface tsa mallctl li ekelitsoe:
- opt.prof_bt_max;
- arena.
- thread.tcache.max ho fetola le ho fumana tcache_max ea khoele ea hona joale;
- thread.tcache.ncached_max.write le thread.tcache.ncached_max.read_sizeclass ho fetola le ho fumana ncached_max ea thread ea hona joale;
- arenas.hugepage ho kgutlisa boholo ba hugepage bo sebedisitsweng, bo boetse bo rometswe ho dipalopalo tsa malloc;
- approximate_stats.active ho fumana boleng bo hakanyetsoang ba palo ea hona joale ea li-byte tse sebetsang, tse sa lokelang ho bapisoa le lipalo-palo tse ling tse fumanoeng.
- Liphoso tse ngata le tsona li lokisitsoe 'me litokomane li ntlafalitsoe.
Source: linux.org.ru
