Re: memory allocations.
- From: Havoc Pennington <hp redhat com>
- To: Ulrich Drepper <drepper redhat com>
- Cc: Alan Cox <alan redhat com>, chabotc reviewboard com (Chris Chabot), iain ximian com (iain), gnome-hackers gnome org
- Subject: Re: memory allocations.
- Date: 27 Feb 2002 21:01:54 -0500
Ulrich Drepper <drepper redhat com> writes:
> What an application with thousands of memory requests should do (and
> not at the g_malloc level) is to keep memory pool for object of one
> type. These could eventually be kept in per-thread. If applications
> are allocation (and not freeing) thousands of little blocks this
> should be handled by analyzing the object's lifetime and putting them
> in one struct.
This is already done for many objects in GTK/GNOME, especially small
blocks like list nodes.
> If you cannot do this use an automatic garbage collection mechanisms.
>
Everyone would prefer that, plenty of people are trying to figure out
a practical way to migrate in that direction.
For now, things can be improved, but posting profiling or other
analysis is the only way to have something more to say than
speculation.
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]