You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Optimize method PoolChunk.allocate(...) to reduce overhead (#13528)
Motivation:
When goes into method `PoolChunk.allocate(...)`, we need to check
whether `head.next == head`, it has been checked before in method
`PoolArena.tcacheAllocateSmall(...)`, but `head.next` may have been
changed after that, so it needs to be checked again.
This can lower the chance to call `PoolChunk.allocateSubpage(...)` and
`PoolChunk.allocateRun(...)`, so will reduce overhead.
Modification:
Check whether `head.next == head` in method `PoolChunk.allocate(...)`.
Result:
Lower the chance of calling `PoolChunk.allocateSubpage(...)` and
`PoolChunk.allocateRun(...)` to reduce overhead.
Co-authored-by: laosijikaichele <laosijikaichele>
0 commit comments