Changeset: 89e3b1ec33a2 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=89e3b1ec33a2
Modified Files:
gdk/gdk_atoms.c
Branch: Jul2017
Log Message:
Move string heap check to after we updated the hash.
diffs (35 lines):
diff --git a/gdk/gdk_atoms.c b/gdk/gdk_atoms.c
--- a/gdk/gdk_atoms.c
+++ b/gdk/gdk_atoms.c
@@ -1185,6 +1185,15 @@ strCleanHash(Heap *h, int rebuild)
newhash[off] = (stridx_t) (pos - extralen - sizeof(stridx_t));
pos += GDK_STRLEN(s);
}
+ /* only set dirty flag if the hash table actually changed */
+ if (memcmp(newhash, h->base, sizeof(newhash)) != 0) {
+ memcpy(h->base, newhash, sizeof(newhash));
+ if (h->storage == STORE_MMAP) {
+ if (!(GDKdebug & NOSYNCMASK))
+ (void) MT_msync(h->base, GDK_STRHASHSIZE);
+ } else
+ h->dirty = 1;
+ }
#ifndef NDEBUG
if (GDK_ELIMDOUBLES(h)) {
pos = GDK_STRHASHSIZE;
@@ -1199,15 +1208,6 @@ strCleanHash(Heap *h, int rebuild)
}
}
#endif
- /* only set dirty flag if the hash table actually changed */
- if (memcmp(newhash, h->base, sizeof(newhash)) != 0) {
- memcpy(h->base, newhash, sizeof(newhash));
- if (h->storage == STORE_MMAP) {
- if (!(GDKdebug & NOSYNCMASK))
- (void) MT_msync(h->base, GDK_STRHASHSIZE);
- } else
- h->dirty = 1;
- }
h->cleanhash = 0;
}
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list