Re: Memory tracking in GJS

2014-02-20 Thread Colin Walters
On Wed, Feb 19, 2014 at 8:50 PM, Cosimo Cecchi wrote: Hi all, The state of garbage collection for typical GTK/JS applications is pretty sad these days. It's worth a comparison with (C)Python. In some ways, Python's hybrid refcount + GC is the worst of both worlds - you have the constant

Re: Memory tracking in GJS

2014-02-20 Thread Ryan Lortie
hi, On Thu, Feb 20, 2014, at 7:53, Giovanni Campagna wrote: > It's worth pointing out that mozjs will *force* a garbage collect if > you go over the malloc limit (a dynamic value between 30 and 90 MB), > but will garbage collect a lot more often if you call MaybeGC. My preferred solution to the p

Re: Memory tracking in GJS

2014-02-20 Thread Colin Walters
On Thu, Feb 20, 2014 at 7:53 AM, Giovanni Campagna wrote: We can probably look into mallinfo() as well, Been there, done that: https://git.gnome.org/browse/gjs/commit/?id=7aae32d1df14af87e9a31c785447b27012b64af9 ___ gtk-devel-list mailing list

Re: Memory tracking in GJS

2014-02-20 Thread Giovanni Campagna
2014-02-20 2:50 GMT+01:00 Cosimo Cecchi : > Hi all, > > The state of garbage collection for typical GTK/JS applications is pretty > sad these days. mozjs will execute a garbage collection run when it thinks > around 30MB of allocations have been done. It's worth pointing out that mozjs will *force

Re: Memory tracking in GJS

2014-02-20 Thread Lionel Landwerlin
Hey Cosimo, Nice to see someone looking at this issue. On 20/02/14 01:50, Cosimo Cecchi wrote: * keep track of memory allocated in GJS itself. We can use GType to query the size of the instance, class and even the size of private data. This still doesn't include additional allocations inside t