Changeset: 40911aac3b02 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=40911aac3b02
Modified Files:
        gdk/gdk_atoms.c
Branch: Oct2014
Log Message:

When growing a string heap, don't double the size always.
We want to grow, but doubling the size eats up the address space too
fast.


diffs (15 lines):

diff --git a/gdk/gdk_atoms.c b/gdk/gdk_atoms.c
--- a/gdk/gdk_atoms.c
+++ b/gdk/gdk_atoms.c
@@ -1116,7 +1116,10 @@ strPut(Heap *h, var_t *dst, const char *
 
                /* double the heap size until we have enough space */
                do {
-                       newsize <<= 1;
+                       if (newsize < 4 * 1024 * 1024)
+                               newsize <<= 1;
+                       else
+                               newsize += 4 * 1024 * 1024;
                } while (newsize <= h->free + pad + len + extralen);
 
                assert(newsize);
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to