Re: Memory tracking in GJS
- From: Andy Wingo <wingo pobox com>
- To: Cosimo Cecchi <cosimoc gnome org>
- Cc: gtk-devel-list <gtk-devel-list gnome org>
- Subject: Re: Memory tracking in GJS
- Date: Sun, 02 Mar 2014 21:37:12 +0100
Hi,
A little late here. SM's GC needs to know about all allocations that it
might collect, both those that it can trace and those that it can't.
Ideally GLib could define an interface
void g_register_allocation (size_t bytes, char *for_whom);
and GJS should register some listener on that allocation recorder, which
then bumps SM's mallocation counter (which would then cause GC to happen
more frequently -- but not "all the time", rather when needed. Of
course then you have to patch gdk-pixbuf and everyone else to record
allocations, but that's cheap and doable -- basically it's just
gdk-pixbuf and the slice allocator anyway, no?
To do otherwise is to solve most problems but leave some pathological
cases unhandled.
Regards,
Andy
--
http://wingolog.org/
[Date Prev][
Date Next] [Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]