aboutsummaryrefslogtreecommitdiffhomepage
path: root/sample.teco_ini
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2015-02-23 02:54:41 +0100
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2015-02-23 02:54:41 +0100
commitb40fe867e021bc365df1a904c2b1ed2068208f13 (patch)
tree94fa618661bec5e25980bde2cb01249c5c3e2c35 /sample.teco_ini
parent611bb221a96e50fd8561886ec34d8a42e136b5ce (diff)
downloadsciteco-b40fe867e021bc365df1a904c2b1ed2068208f13.tar.gz
implemented to undo stack memory limiting
* acts as a safe-guard against uninterrupted infinite loops or other operations that are costly to undo in interactive mode. If we're out of memory, it is usually too late to react properly. This implementation tries to avoid OOMs due to SciTECO behaviour. We cannot fully exclude the chance of an OOM error. * The undo stack size is only approximated using the UndoToken::get_size() method. Other ways to measure the exact amount of allocated heap (including size fields in every heap object or using sbrk(0) and similar) are either costly in terms of memory or platform-specific. This implementation does not need any additional memory per heap object or undo token but exploits the fact that undo tokens are virtual already. The size of an undo token is determined at compile time. * Default memory limit of 500mb should be OK for most people. * The current limit can be queried with "2EJ" and set with <x>,2EJ. This also works interactively (a bit tricky!) * Limiting can be disabled. In this case, undo token processing is a bit faster. * closes #3
Diffstat (limited to 'sample.teco_ini')
-rw-r--r--sample.teco_ini3
1 files changed, 3 insertions, 0 deletions
diff --git a/sample.teco_ini b/sample.teco_ini
index adc37ab..5a2b624 100644
--- a/sample.teco_ini
+++ b/sample.teco_ini
@@ -40,6 +40,9 @@ EMQ[$SCITECOPATH]/fnkeys.tes
! Uncomment to enable default keyboard macros !
! 0,64ED !
+! Uncomment to tweak the undo stack memory limit !
+! 500*1024*1024,2EJ !
+
! If files are given on the command-line, open them
and disable session saving.
Otherwise open a buffer session. !