[chuck-users] recycling program
Tom Duff
td at pixar.com
Wed Mar 18 12:06:41 EDT 2009
I haven't read enough to be sure, but there are signs that while Chuck
frees some dead memory, it has no general garbage collection. For
example, consider these definitions in chuck_vm.cpp (which, btw, aren't
called anywhere):
//-----------------------------------------------------------------------------
// name: gc
// desc: ...
//-----------------------------------------------------------------------------
void Chuck_VM::gc( t_CKUINT amount )
{
}
//-----------------------------------------------------------------------------
// name: gc
// desc: ...
//-----------------------------------------------------------------------------
void Chuck_VM::gc( )
{
}
On Tue, 17 Mar 2009, Robert Poor wrote:
> Are there tools or techniques for monitoring memory allocation in
> ChucK? I've been stress testing my code, and after about five hours
> ChucK vm stops with a malloc / mmap failure. It would be nice to
> figure out what's clogging memory. [In a previous life, I was an
> embedded systems programmer, so I'm happy to create reusable object
> pools and managing the objects myself, but I need to know what leaks
> and what doesn't.]
>
> On a related note, I notice that ChucK uses the standard library
> malloc rather centralizing calls through a single chuck_malloc() (or
> the existing checked_malloc()). Going through a single call would
> make it easier to monitor heap allocations. Just my $0.25.
>
> - Rob
>
>
>
--
Tom Duff. System clock out of range.
More information about the chuck-users
mailing list