]> git.kaiwu.me - njs.git/commit
Memory pool: cached slot index in a page
authorDmitry Volyntsev <xeioex@nginx.com>
Tue, 8 Sep 2026 22:50:16 +0000 (15:50 -0700)
committerDmitry Volyntsev <xeioexception@gmail.com>
Fri, 18 Sep 2026 20:42:16 +0000 (13:42 -0700)
commit528c1ac6e2e51cd6d87193da8666fc9a437858c5
tree3828060bd4d69356e92f68d5bc9107dbe89f51b2
parent9e7d2e32efa4bd60a582476d90b4ef4984aef159
Memory pool: cached slot index in a page

Previously, freeing a chunk searched the pool slots linearly to map the
chunk size back to its slot.

The fix is to keep the slot index in the page descriptor, in a byte
that was unused.
src/njs_mp.c