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 » [FEATURE REQUEST] could Alloc fail a little more gracefully?
Re: [FEATURE REQUEST] could Alloc fail a little more gracefully? [message #17640 is a reply to message #17623] Sun, 24 August 2008 16:36 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 14266
Registered: November 2005
Ultimate Member
nixnixnix wrote on Fri, 22 August 2008 18:53


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?



I guess using Raster and GetSize, then do cx * cy * 4 and make sure it is less than 100MB should work... and is the only reasonable solution to the problem anyway.

Other than that, it is really quite hard to guess which allocation will fail. The real problem is "define failure". On system with 10GB swap and 512MB RAM, you might be able to open very big image, but system can become completely unresponsive (HD light on for hours, mouse does not move, ... etc...)

Mirek
 
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: StrIntValue -> uses int64
Next Topic: Full Support for timezone/DST [FEATURE REQUEST]
Goto Forum:
  


Current Time: Sun Jul 20 04:59:48 CEST 2025

Total time taken to generate the page: 0.02755 seconds