Changeset: 93b8c8c0dee0 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=93b8c8c0dee0
Modified Files:
gdk/gdk_heap.c
Branch: Feb2013
Log Message:
Fix for one of the problems in bug 3323.
When the code decided to use a pre-existing memory map, and the map
needed to be extended, the remapping of the extended file failed due
to incorrect use of the file name parameters. We now use MT_mremap to
do the extending and remapping.
diffs (23 lines):
diff --git a/gdk/gdk_heap.c b/gdk/gdk_heap.c
--- a/gdk/gdk_heap.c
+++ b/gdk/gdk_heap.c
@@ -174,14 +174,13 @@ HEAPcacheFind(size_t *maxsz, char *fn, s
long_str fn;
GDKfilepath(fn, HCDIR, e->fn, NULL);
- if (GDKextend(fn, *maxsz) == 0) {
- void *base = GDKload(fn, NULL, *maxsz, *maxsz,
STORE_MMAP);
- GDKmunmap(e->base, e->maxsz);
+ base = MT_mremap(fn, MMAP_READ | MMAP_WRITE, e->base,
e->maxsz, *maxsz);
+ if (base == NULL) {
+ /* extending may have failed */
+ e = NULL;
+ } else {
e->base = base;
e->maxsz = *maxsz;
- } else {
- /* extending may have failed */
- e = NULL;
}
}
if (e != NULL) {
_______________________________________________
checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list