gnash-dev
[Top][All Lists]
Advanced

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

Re: [Gnash-dev] Memory use


From: strk
Subject: Re: [Gnash-dev] Memory use
Date: Tue, 15 Dec 2009 00:02:56 +0100

On Mon, Dec 14, 2009 at 03:48:53PM -0700, Rob Savoye wrote:
> On 12/14/09 15:34, strk wrote:
> 
> >Can anyone think of other strategies to decide *when* to run the GC ?
> 
>   Back when I worked on LISP systems (25 years ago), the GC would run 
> in a separate thread based on a timer, as opposed to any other action. 
> Each object was tagged as to it's state, and the GC would just remove 
> anything with the appropriate state. Some customers of mine back then 
> would often play games with the time slice for the GC to get the optimal 
> memory uses. (back then memory was still expensive)

An incremental GC might be interesting to go after.
But I'm still don't see how it could work.
I've been reading some about the tri couloring scheme
but can't figure how AS code could be guaranteed NOT
to change the color of an element in a GC set
(ie: drop a ref, add a ref); I guess it'd take something
like re-adding refcounting, at which point we may as well
add the refcounting back to clean most memory and just use
GC for the strictly circular refs..

>   Just as a note, there is some other memory profiling built into Gnash 
> that uses mallinfo() to get memory stats from the kernel. There are also 
> some utility functions in gmemory.h like startCheckpoint(), 
> endCheckpoint(), to get finer grained info of where memory was going. I 
> also added support to jemalloc to support mallinfo() as well.

Might do some experiment with those in the GC class to check allocated
memory between runs and switch collection on that.
Dunno if I'll find the time though.

>   Out of curiosity, did you run your tests with or without jemalloc ? 
> It's better tweaked for all the small allocations of memory that an OOPS 
> language uses.

I noticed the problem with jemalloc. Tried w/out while wondering why
GLIBCXX_FORCE_NEW wasn't helping (but didnt' help anyway).
The most recent numbers come from a non-jemalloc'ed build.

--strk;

 Free GIS & Flash consultant/developer      ()  ASCII Ribbon Campaign
 http://foo.keybit.net/~strk/services.html  /\  Keep it simple! 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]