diff options
author | nyamatongwe <unknown> | 2001-04-25 01:35:47 +0000 |
---|---|---|
committer | nyamatongwe <unknown> | 2001-04-25 01:35:47 +0000 |
commit | 9701edb696cc54ae66f1e10fb6e946df1426f71a (patch) | |
tree | 3d6ec0414e27f871a5d5b3279636d32a14ae9e95 /src | |
parent | c1dade69f80688926f9e038f48ce0b1e711b2ad0 (diff) | |
download | scintilla-mirror-9701edb696cc54ae66f1e10fb6e946df1426f71a.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')
-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); |