From: Matthew Wilcox > Sent: 08 November 2018 14:07 ... > > You'd be looking for something like dynamic perfect hashing then? > I think that'd make a great project for someone to try out. I don't > have the time to look into it myself, and I'm not convinced there's > a real workload that would benefit. But it'd be a great project for > a university student. Been there, done that several times. Half an afternoon's work. I'm surprised there isn't a C++ container class that will give you a 'id' for a pointer (or other large value). But they all do it the other way around. It is also trivial to double the size of the array and 'unzip' the allocated items into their correct halves while adding the other entry to the free list. David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)