Re: memory allocations.



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]