Am 21.08.2012 09:52, schrieb Thiago Macieira:
On segunda-feira, 20 de agosto de 2012 17.31.27, John Weeks wrote:
On 20-Aug-2012, at 4:20 PM, Thiago Macieira wrote:
In any case, if the application needs memory and can't get it, what do you
suggest it do?

You put up an alert telling the user that the operation can't be completed
due to insufficient memory,

How? Putting up an alert usually requires allocating memory somewhere, be it
in your application or in the display server.

Look at the various solutions used as "new handlers". For example, you could pre-allocate some amount of memory and an open file handle / some NVRAM space / ... for "panic actions".

If we're already out of memory, the likelihood of another set of allocations
succeeding is quite low. Not to mention that, by the time you do run out of
memory, the chances are that the system has been swapping hard for several
minutes. The user will have likely pressed the Reset button long ago.

On systems that support swap space, this may hold true - as long as the system is not configured to use none...

For safety critical systems, these definitely are issues to address - if Qt is a suitable framework for these kind of applications is a different topic...

Back on topic: There are third party memory allocators for various purposes that might do a better job than the one bundled with the OS. But the gap narrows.

Best Regards / Mit freundlichen Grüßen
Rainer Wiesenfarth

--
Tel.: +49 (0)711 22 88-10  *  Fax: +49 (0)711 22 88-111
Web: http://www.trimble.com/geospatial/  *  http://www.inpho.de/
Trimble Germany GmbH  *  Branch office Stuttgart
Rotebühlstraße 81  *  70178 Stuttgart  *  Germany
Commercial register: HRB 83893, Darmstadt
Managing Directors: Dr. Frank Heimberg, Hans-Jürgen Gebauer

Attachment: smime.p7s
Description: S/MIME Kryptografische Unterschrift

_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to