we should look into replacing the vector of pages with a growable mmaped region. then, when we need more pages, rather than hitting malloc to make a big vec, we can increase the size of the mem map. growing a shard could potentially be much faster.
the downside is that this inherently means a bunch more unsafe code. it could be feature-flagged, but i'm not sure if it would be worth maintaining 2 impls.
we should look into replacing the vector of pages with a growable
mmap
ed region. then, when we need more pages, rather than hitting malloc to make a big vec, we can increase the size of the mem map. growing a shard could potentially be much faster.the downside is that this inherently means a bunch more unsafe code. it could be feature-flagged, but i'm not sure if it would be worth maintaining 2 impls.