]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
DynBuf: Start smaller
authorOliver Kurth <okurth@vmware.com>
Fri, 15 Sep 2017 18:23:03 +0000 (11:23 -0700)
committerOliver Kurth <okurth@vmware.com>
Fri, 15 Sep 2017 18:23:03 +0000 (11:23 -0700)
DynBuf operations are mostly concerned with strings - and most strings
are less than 128 bytes long. Shorten the initial allocation.

open-vm-tools/lib/misc/dynbuf.c

index 3ba1a92fececb679b55483768cacb71ca478084b..ed68a30831454a62127d60a0cf3f6394eb371f0a 100644 (file)
@@ -293,10 +293,10 @@ DynBuf_Enlarge(DynBuf *b,       // IN/OUT:
                         1
 #else
                         /*
-                         * Initial size: 1 KB. Most buffers are smaller than
-                         * that --hpreg
+                         * Most DynBuf operations are on strings. Most strings
+                         * are less than 128 bytes long.
                          */
-                        1 << 10
+                        128
 #endif
                       ;