To deal with that, I added mark/release functions, which I first encountered doing dynamic memory in Turbo Pascal back in the 1980s.
So the idea was, at the beginning of generating one search response, set a Mark in the slab. After the response is sent, do a Release which resets the slab state back to where the Mark was set. This gave us lightning fast request processing. But then we had further complications...