[Github-comments] [geany/geany] Geany should check Scintilla status after operations (#1569)

AdamDanischewski notifications at xxxxx
Fri Aug 4 03:58:43 UTC 2017


I don't have much time - but if anyone wants to take a crack at finding sensible settings for a healthy memory reserve threshold, to preclude freezes and data loss. I took a quick look via strace, and a strace output parser I found (https://github.com/gmarcais/memtrace), here is what my system looks like for my typical use: 
```
$> strace -e trace=memory geany &> /tmp/mystrace.txt
$> ./memtrace.rb -f /tmp/mystrace.txt 
      max: heap    7675904  (7.32M) mmap   17944616  (17.1M) vm   25620520  (24.4M)
```
So, for my typical use case having around 50MB should cover what is actually required - but the healthy buffer itself is beyond what is required to run so adding a few more MB (~5MB) should normally be okay. If the user strays outside of the healthy reserve then Geany/Scintilla should try to allocate what will be required + however much more to get back the healthy buffer. If Geany cannot allocate the memory for both then a warning should be thrown telling the user of the situation and allowing the user to take corrective measures (e.g. saving) and preclude data loss. 

So to be clear the healthy buffer is not necessarily stopping the user from any operations, it is simply a safety margin to allow for saves and clean shutdown of what Geany is already dealing with *before*  Geany actually runs out of memory. 

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/1569#issuecomment-320150354
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20170804/31ca9f0f/attachment.html>


More information about the Github-comments mailing list