Use rtree-based chunk lookups rather than pointer bit twiddling.
Look up chunk metadata via the radix tree, rather than using CHUNK_ADDR2BASE(). Propagate pointer's containing extent. Minimize extent lookups by doing a single lookup (e.g. in free()) and propagating the pointer's extent into nearly all the functions that may need it.
This commit is contained in:
@@ -180,6 +180,15 @@ chunk_deregister(const void *chunk, const extent_t *extent)
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
chunk_reregister(tsdn_t *tsdn, const void *chunk, const extent_t *extent)
|
||||
{
|
||||
bool err;
|
||||
|
||||
err = chunk_register(tsdn, chunk, extent);
|
||||
assert(!err);
|
||||
}
|
||||
|
||||
/*
|
||||
* Do first-best-fit chunk selection, i.e. select the lowest chunk that best
|
||||
* fits.
|
||||
|
||||
Reference in New Issue
Block a user