<blockquote>
<p>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.</p>
</blockquote>
<p>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.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/geany/geany/issues/1569#issuecomment-320142642">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABDrJ-5GkM9AY717Je2JATERZYYzls40ks5sUocwgaJpZM4OtGp5">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABDrJ8KmxyYh3xFg3Own89E8yN3jN-nlks5sUocwgaJpZM4OtGp5.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/geany/geany/issues/1569#issuecomment-320142642"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/geany/geany","title":"geany/geany","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/geany/geany"}},"updates":{"snippets":[{"icon":"PERSON","message":"@AdamDanischewski in #1569: \u003e 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.\r\n\r\nI'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. "}],"action":{"name":"View Issue","url":"https://github.com/geany/geany/issues/1569#issuecomment-320142642"}}}</script>