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 |
|
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...
|
|
|
|
|
Out of memory panic
By: koldo on Thu, 17 May 2012 12:38
|
|
|
Re: Out of memory panic
|
|
|
Re: Out of memory panic
|
|
|
Re: Out of memory panic
By: Tom1 on Sat, 19 May 2012 20:36
|
|
|
Re: Out of memory panic
|
|
|
Re: Out of memory panic
By: Tom1 on Sat, 19 May 2012 22:28
|
|
|
Re: Out of memory panic
|
|
|
Re: Out of memory panic
By: koldo on Sun, 20 May 2012 16:38
|
|
|
Re: Out of memory panic
By: mirek on Sun, 20 May 2012 17:13
|
|
|
Re: Out of memory panic
|
|
|
Re: Out of memory panic
By: koldo on Sun, 20 May 2012 20:15
|
|
|
Re: Out of memory panic
|
|
|
Re: Out of memory panic
By: koldo on Sun, 20 May 2012 20:52
|
|
|
Re: Out of memory panic
By: mirek on Mon, 21 May 2012 13:35
|
|
|
Re: Out of memory panic
|
|
|
Re: Out of memory panic
By: mirek on Tue, 22 May 2012 13:11
|
|
|
Re: Out of memory panic
By: mirek on Sun, 20 May 2012 17:11
|
Goto Forum:
Current Time: Thu May 16 11:44:31 CEST 2024
Total time taken to generate the page: 0.01714 seconds
|