On Sat, Dec 23, 2017 at 03:39:53PM +0100, Otto Moerbeek wrote: > Hi, > > Largely cleanup and small optimizations: > > - remove over-initializaition of chunks: canary is set only once, > other fields only as-needed. > - remember position of last free bit in chunk_info, so we can start at > the proper spot the next time. To be able to do this a field was added > to chunk_info. To make room, the chunk_info canary is now only a > short. This still detects acccidental overflows. > - the code that scans for a free bit in chunk_info is made more clear > and a bit faster. > - for the page cache, also rememberthe position to continue scanning. Only > randomize when putting things into the cache. > > reviews and tests appreciated,
btw, i realized the init of most the other fields of struct chunk_info can be also done exactly once after allocation, no need to redo them in omalloc_make_chunks(). After this is in, I'll work on that, -Otto