dtoolbase: Fix small memory leak in NeverFreeMemory
It's using a set purely keyed by number of remaining bytes, so if there are two pages with the exact same number of remaining bytes, one of them gets lost. See #1077
This commit is contained in:
parent
b5c857c73f
commit
74983d19a4
|
|
@ -80,7 +80,11 @@ Page(void *start, size_t size) :
|
|||
*/
|
||||
INLINE bool NeverFreeMemory::Page::
|
||||
operator < (const NeverFreeMemory::Page &other) const {
|
||||
return _remaining < other._remaining;
|
||||
if (_remaining != other._remaining) {
|
||||
return _remaining < other._remaining;
|
||||
} else {
|
||||
return _next < other._next;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue