> To be clear Scintilla does keep a "healthy" amount of memory allocated, but 
> it decreases as you add characters to it until its full then reallocates, and 
> if you do a big copy and paste you can exceed ANY pre-allocation, so there is 
> no point of trying to guess, you always have to handle allocation failure.

I'm talking about keeping a certain memory reserve at all times, that is set to 
something sensible that could be modified in a setting by the user and if the 
healthy buffer theshold amount cannot be allocated then the warning happens. 
This would allow the user to "tidy up" and save the program before any 
crash/freeze event occurs. Thereafter the save the buffers are wiped out and 
there is enough memory again. Not simply allocating a healthy buffer initially 
and then writing to it until it runs all the way out and hope that it can 
allocate more - it could be dangerous letting things go that far. 

-- 
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-320142642

Reply via email to