pointers into it we're actually holding in main() as well as the
ones tucked away in subsystems' state.
git-svn-id: svn://svn.tartarus.org/sgt/agedu@8289
cda61777-01e9-0310-a592-
d414129be87e
int i;
if (totalsize - indexbuild_realsize(ib) < delta) {
int i;
if (totalsize - indexbuild_realsize(ib) < delta) {
+ const void *oldfile = mappedfile;
+ ptrdiff_t diff;
+
/*
* Unmap the file, grow it, and remap it.
*/
/*
* Unmap the file, grow it, and remap it.
*/
indexbuild_rebase(ib, mappedfile);
triewalk_rebase(tw, mappedfile);
indexbuild_rebase(ib, mappedfile);
triewalk_rebase(tw, mappedfile);
+ diff = (const unsigned char *)mappedfile -
+ (const unsigned char *)oldfile;
+ if (prevtf)
+ prevtf = (const struct trie_file *)
+ (((const unsigned char *)prevtf) + diff);
+ if (tf)
+ tf = (const struct trie_file *)
+ (((const unsigned char *)tf) + diff);