Re: memory allocations.
- From: jg pa dec com (Jim Gettys)
- To: James Henstridge <james daa com au>
- Cc: Havoc Pennington <hp redhat com>, Ulrich Drepper <drepper redhat com>, Sander Vesik <sv117949 ireland sun com>, Alan Cox <alan redhat com>, Chris Chabot <chabotc reviewboard com>, iain <iain ximian com>, gnome-hackers gnome org
- Subject: Re: memory allocations.
- Date: Fri, 1 Mar 2002 01:13:12 -0800 (PST)
Please don't forget other options: often it is better to arrange not to have
to do an allocation at all, than to amazingly optimize the allocator.
This discussion is reminding me of days when we identified memory allocation
as one of the hotspots inside the X server; by some care, we arranged
to allocate related objects simultaneously in a single malloc and reduced the number of calls to malloc by a substantial factor (2-3x),
while saving the memory overhead
as well, also saving substantial overhead and improving memory footprint
and cache behavior, and avoiding fragmentation.
Similar work was done elsewhere in some of the toolkits (e.g. Xt, Xaw).
Cambridge Research Laboratory
Compaq Computer Corporation
jg pa dec com
gnome-hackers mailing list
gnome-hackers gnome org
] [Thread Prev