Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Core » Out of memory panic
Re: Out of memory panic [message #36340 is a reply to message #36332] Mon, 21 May 2012 13:35 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 13980
Registered: November 2005
Ultimate Member
mdelfede wrote on Sun, 20 May 2012 14:20

koldo wrote on Sun, 20 May 2012 20:15

Hello Massimo. You are in fact adding a OutOfMemoryHandler too. However I prefer the programmer and the user to use as much memory as it is available.


Well, if you trigger the memory callback when mem is completely exhausted, you won't be able to do anything when inside it... OTOH, if you estimate a "right" amount that triggers it, you'll be able to gracefully recover.
Anyways, you could do something like

::SetMemoryLimit(INFINITE, THISBACK(myHandler)); // No preset limit


you could also have the maximum available mem.

Max



Well, this has the problem that you do not really know how much memory is really available...
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: ...nize class
Next Topic: Value: String to int - problem or feature?
Goto Forum:
  


Current Time: Thu May 16 11:44:31 CEST 2024

Total time taken to generate the page: 0.01714 seconds