From 5395a7da901e4af9758762215b75d943ef253ef3 Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Sat, 28 Sep 2024 00:30:09 +0200 Subject: check the memory limit and allow interruptions when loading files * Previously you could open files of arbitrary size and the limit would be checked only afterwards. * Many, but not all, cases should now be detected earlier. Since Scintilla allocates lots of memory as part of rendering, you can still run into memory limits even after successfully loading the file. * Loading extremely large files can also be potentially slow. Therefore, it is now possible to interrupt via CTRL+C. Again, if the UI is blocking because of stuff done as part of rendering, you still may not be able to interrupt the "blocking" operation. --- tests/testsuite.at | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests') diff --git a/tests/testsuite.at b/tests/testsuite.at index 8a3ba96..fc7de4f 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -160,6 +160,11 @@ AT_SETUP([Memory limiting during spawning]) AT_CHECK([$SCITECO -e "50*1000*1000,2EJ 0,128ED @EC'dd if=/dev/zero'"], 1, ignore, ignore) AT_CLEANUP +AT_SETUP([Memory limiting during file reading]) +AT_CHECK([dd if=/dev/zero of=big-file.txt bs=1000 count=50000], 0, ignore, ignore) +AT_CHECK([$SCITECO -8e "50*1000*1000,2EJ @EB'big-file.txt'"], 1, ignore, ignore) +AT_CLEANUP + AT_SETUP([Q-Register stack cleanup]) AT_CHECK([$SCITECO -e '@<:@a'], 0, ignore, ignore) AT_CLEANUP -- cgit v1.2.3