Re: memory allocations.
- From: Havoc Pennington <hp redhat com>
- To: Chris Chabot <chabotc reviewboard com>
- Cc: iain <iain ximian com>, gnome-hackers gnome org
- Subject: Re: memory allocations.
- Date: 27 Feb 2002 14:49:33 -0500
Chris Chabot <chabotc reviewboard com> writes:
> Havoc Pennington wrote:
> > iain <iain ximian com> writes:
> >>I'm not sure where this could go, possibly in g_thread_init add a call
> >>to g_mem_set_vtable which switches to the faster malloc?
> >>
> >>Comments?
> >>
> > That would make malloc unthreadsafe as soon as you turned on
> > threading. ;-) Maybe not a great idea...
>
>
> However, looking at the amount of mallocs happening duing the startup
> of even the simplest gnome2 app, does indicate this could be a big
> optimisation.
Well it would also be a big optimization if malloc was:
void*
malloc (size_t bytes)
{
return NULL;
}
But it wouldn't work very well.
KDE isn't using threads, just linking to -lpthread. We are actually
using threads for gnome-vfs.
> btw, by comparisment, starting up gdict (gnome1 version) generates
> 6000 mallocs. this is less then 50% of the malloc count for its gnome2
> version.
Not useful info unless you track what's causing the mallocs.
We sort of already expect malloc() use to go up since we are dropping
all the mem chunk BS over time.
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]