|
|
Home » U++ Library support » U++ Core » [FEATURE REQUEST] could Alloc fail a little more gracefully?
[FEATURE REQUEST] could Alloc fail a little more gracefully? [message #17623] |
Sat, 23 August 2008 00:53 |
nixnixnix
Messages: 415 Registered: February 2007 Location: Kelowna, British Columbia
|
Senior Member |
|
|
Having being persuaded that new[] is bad and that Buffer::Alloc() is way better, I have hit a snag. When new[] fails it returns a NULL pointer but when Alloc fails it panics and we get an "Out of Memory" message. Is there a way to check if something can be built before we try please?
This is particularly awkward when creating a large Image. Is there a way to know ahead of time that it will fail and is it possible to make bigger ones under a 64bit OS?
Cheers,
Nick
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: [FEATURE REQUEST] could Alloc fail a little more gracefully? [message #17887 is a reply to message #17847] |
Mon, 01 September 2008 20:36 |
nixnixnix
Messages: 415 Registered: February 2007 Location: Kelowna, British Columbia
|
Senior Member |
|
|
Hi Mirek,
This is specifically for images that I want to display on screen.
I already process some very large ~2GB data grids by doing something similar to what you suggest.
So far I am having trouble compiling for 64 bit under vista 64 (different thread) but once I get past that I'll let you know if I still get the same problems with large images.
At present, I am handling this by sampling every one in 2 or one in 4 pixels(grid values) but I think I'll need to move to support image pyramids eventually. My worry about the image size limit was that it would not go away under 64 bit but you're suggesting it probably will so that is good.
Cheers,
Nick
[Updated on: Mon, 01 September 2008 20:37] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Mon Apr 29 08:42:57 CEST 2024
Total time taken to generate the page: 0.03152 seconds
|
|
|