Changeset: b21b2a2fbe50 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b21b2a2fbe50 Modified Files: gdk/gdk_heap.c Branch: Nov2019 Log Message:
Don't force allocations smaller than 4 pages to be malloced. Using default settings they will still be malloced, though. diffs (29 lines): diff --git a/gdk/gdk_heap.c b/gdk/gdk_heap.c --- a/gdk/gdk_heap.c +++ b/gdk/gdk_heap.c @@ -110,7 +110,6 @@ HEAPalloc(Heap *h, size_t nitems, size_t return GDK_FAIL; } if (GDKinmemory() || - h->size < 4 * GDK_mmap_pagesize || (GDKmem_cursize() + h->size < GDK_mem_maxsize && h->size < (h->farmid == 0 ? GDK_mmap_minsize_persistent : GDK_mmap_minsize_transient))) { h->storage = STORE_MEM; @@ -204,7 +203,7 @@ HEAPextend(Heap *h, size_t size, bool ma /* extend a malloced heap, possibly switching over to * file-mapped storage */ Heap bak = *h; - bool exceeds_swap = size >= 4 * GDK_mmap_pagesize && size + GDKmem_cursize() >= GDK_mem_maxsize; + bool exceeds_swap = size + GDKmem_cursize() >= GDK_mem_maxsize; bool must_mmap = !GDKinmemory() && (exceeds_swap || h->newstorage != STORE_MEM || size >= (h->farmid == 0 ? GDK_mmap_minsize_persistent : GDK_mmap_minsize_transient)); h->size = size; @@ -610,7 +609,7 @@ HEAPload_intern(Heap *h, const char *nme char *srcpath, *dstpath, *tmp; int t0; - h->storage = h->newstorage = h->size < 4 * GDK_mmap_pagesize ? STORE_MEM : STORE_MMAP; + h->storage = h->newstorage = h->size < GDK_mmap_minsize_persistent ? STORE_MEM : STORE_MMAP; minsize = (h->size + GDK_mmap_pagesize - 1) & ~(GDK_mmap_pagesize - 1); if (h->storage != STORE_MEM && minsize != h->size) _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list