Home » U++ Library support » U++ Core » Out of memory panic
Re: Out of memory panic [message #36327 is a reply to message #36325] |
Sun, 20 May 2012 17:19   |
mdelfede
Messages: 1310 Registered: September 2007
|
Ultimate Contributor |
|
|
mirek wrote on Sun, 20 May 2012 17:13 |
Well, if adding "OutOfMemoryHandler" function would statisfy you, I have no problem adding it.
However, please notice that you can do very little in such handler.... You e.g. cannot even call Exclamation to report the issue...
|
I guess that the best would be to add a trigget with an user-settable memory level.
I mean :
::SetMemoryLimit(1000000000, THISBACK(myHandler)); // 1 GB
......
byte *x = new byte[500000000];
byte *y = new byte[500000000];
byte *z = new byte; <<-- This one triggers the handler
Of course, the Upp allocator should, when limit reached :
1) - Disable the handler
2) - Return NULL, just in case....
3) - Allow normal usage, allowing the user handler to do whathever he wants.
Max
[Updated on: Sun, 20 May 2012 17:20] Report message to a moderator
|
|
|
 |
|
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 Aug 28 08:56:42 CEST 2025
Total time taken to generate the page: 0.06580 seconds
|