liballocs icon indicating copy to clipboard operation
liballocs copied to clipboard

generic_malloc can't always resolve interior pointers

Open stephenrkell opened this issue 4 years ago • 0 comments

The idea of a bounded backward search is really good for speed. But it creates a tricky contract: get_info() is only supposed to work for interior pointers no more than a certain distance from the start of the object. (What distance? The size of the biggest unpromoted allocation. You can find the other allocations as bigallocs.)

Maybe we need 'fast' and 'complete' query functions? Or maybe our 'hit search bound' path needs to try the bigallocs? Normally, a client would have tried bigallocs 'on the way down', so this path would be redundant. It probably doesn't hurt, though.

Remember that as of recent changes, we index 'big' promoted allocations in the usual way, using inserts (trailers), rather than a field in the bigalloc record.

stephenrkell avatar Feb 10 '22 19:02 stephenrkell