Re: Memory allocation troubles
- From: Tristan Van Berkom <tristan van berkom gmail com>
- To: Olaf FrÄczyk <olaf cbk poznan pl>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: Memory allocation troubles
- Date: Tue, 19 Oct 2004 08:23:33 -0400
On Tue, 19 Oct 2004 09:27:22 +0200, Olaf FrÄczyk <olaf cbk poznan pl> wrote:
Hi,
I write an application that requires much memory to run.
It is impossible to assume that every time I ask for memory I'll get it.
The application creates many threads (up to several hundreds) each
thread taking about 0,6 MB.
And when I am out of memory I could just wait for some threads to
finish, and try again.
Aborting program is not an option, because before dying I need to clean
things up.
Hmmm,
I fullheartedly agree that programs should be able to run in OOM
situations or at least handle them nicely, unfortunatly we do not represent
a unified front to back up that notion.
You can use g_try_malloc/g_try_realloc but that doesn't change behavior
in fundimental situations such as `g_object_new'.
Note that this behaviour would be very hard to change because most
gtk+ applications depend on that behaviour (and would be segfaulting
if that changed).
Cheers,
-Tristan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]