Re: [gnome-love] Projects using GObject



On Mon, 2007-05-07 at 15:48 -0300, Fabrício FX wrote:
--- Emmanuele Bassi <ebassi gmail com> escreveu:

I used GObject to implement the Dictionary utility,
in order to provide
the backend and infrastructure. you can have a look
at it in GNOME SVN
repository for gnome-utils:

A long time ago, I asked in gtk-app-devel-list about
develop a application that uses *a lot* of GObjects in
memory (more than 10.000 objects, allocating and
deallocating several times). The people said me to
don´t use GObject because it will add a high overhead
in my application.

the size of each single GObject instance is 12 bytes, and it has been so
for a lot of time; to this figure you must (obviously) add the size of
your own instance data and a one-off allocation for the class structure.
for all that matters, 12 bytes per instance is not what I define "high
overhead", especially on desktop machines, but YMMV.

 But now, with GSlice system I don´t
know if it´s viable. Could anyone say anything about
that?

the slice allocator helps when allocating lots of data in small, evenly
sized chunks, by not letting you hit the system malloc() and free().
it's not the solution to every issue - otherwise it would have been
called the panacea allocator - but it can definitely help.

ciao,
 Emmanuele.

-- 
Emmanuele Bassi,  E: ebassi gmail com
W: http://www.emmanuelebassi.net
B: http://log.emmanuelebassi.net




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]