[maemo-developers] Python memory use (was: [maemo-developers] Maemo 2.0 final release available)

From: Gustavo Sverzut Barbieri barbieri at gmail.com
Date: Mon Jul 10 17:18:05 EEST 2006
On 7/10/06, Tommi Komulainen  wrote:
> On Mon, 2006-07-10 at 09:15 -0300, ext Gustavo Sverzut Barbieri wrote:
> > On 7/10/06, Tommi Komulainen <tommi.komulainen at nokia.com> wrote:
> > >      2. memory consumption
> > >      4. run-time speed?
> >
> > These are not an issue, really. Since python does garbage collect, in
> > the long run it may show even more memory efficient than pure C, which
> > may leak.
> Memory leaks in C are fixable, just takes some effort. OTOH the python
> interpreter / wrapper overhead are not. I've also been told that python
> never releases memory back to the system, though that ought to be
> fixable. Whether those are significant issues I haven't measured, just
> some rough edges to keep in mind.

Python overhead shouldn't be that big, at least PyGTK is a really thin
layer. It basically convert parameters from Python to GTK and vice

About python not releasing memory, python, as Glib, does have a memory
pool, it's called pymalloc. You can disable it, but it often will be
slower, because Python does some cache for strings and small objects.

Gustavo Sverzut Barbieri
Jabber: barbieri at gmail.com
   MSN: barbieri at gmail.com
  ICQ#: 17249123
 Skype: gsbarbieri
Mobile: +55 (81) 9927 0010
 Phone:  +1 (347) 624 6296; 08122692 at sip.stanaphone.com
   GPG: 0xB640E1A2 @ wwwkeys.pgp.net

More information about the maemo-developers mailing list