diff options
author | nyamatongwe <devnull@localhost> | 2001-04-25 01:35:47 +0000 |
---|---|---|
committer | nyamatongwe <devnull@localhost> | 2001-04-25 01:35:47 +0000 |
commit | c55ee551f806eabd9eb0ca6f501921c08cbda980 (patch) | |
tree | 3d6ec0414e27f871a5d5b3279636d32a14ae9e95 /src/CellBuffer.cxx | |
parent | a8436cea2a59cce5dc3b090967e5913c08196586 (diff) | |
download | scintilla-mirror-c55ee551f806eabd9eb0ca6f501921c08cbda980.tar.gz |
Changed allocation growth factor to double when it gets less than a sixth of
the buffer size instead of a quarter as this means worst case wasted space of
one quarter rather than one third at little cost in time.
Diffstat (limited to 'src/CellBuffer.cxx')
-rw-r--r-- | src/CellBuffer.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/CellBuffer.cxx b/src/CellBuffer.cxx index 56dd27ea0..56aa15215 100644 --- a/src/CellBuffer.cxx +++ b/src/CellBuffer.cxx @@ -628,7 +628,7 @@ void CellBuffer::RoomFor(int insertionLength) { if (gaplen <= insertionLength) { //Platform::DebugPrintf("need room %d %d\n", gaplen, insertionLength); GapTo(length); - if (growSize * 4 < size) + if (growSize * 6 < size) growSize *= 2; int newSize = size + insertionLength + growSize; //Platform::DebugPrintf("moved gap %d\n", newSize); |