Csound Csound-dev Csound-tekno Search About

Re: [Cs-dev] Memory allocation -- a radical suggestion

Date2009-12-30 19:23
Frommichael.gogins@gmail.com
SubjectRe: [Cs-dev] Memory allocation -- a radical suggestion
I suggest rather replacing all Csound memory allocation with 
garbage-collected memory allocation. Then turn off the garbage collection, 
optionally, during performance. Nothing could be easier, safer, or 
optionally faster and more glitch-free.

http://www.hpl.hp.com/personal/Hans_Boehm/gc/



Regards,
Mike

----- Original Message ----- 
From: "john ffitch" 
To: 
Sent: Wednesday, December 30, 2009 1:54 PM
Subject: [Cs-dev] Memory allocation -- a radical suggestion


> At present there is a list memalloc_db that is maintained of all
> memory allocated.  I have checked the current sources and this is only
> used in debugging and then not in any detail.  This also means that
> there is a spinlock in the memalloc code to protect this variable.
>
> So, how about abandoning this list, and removing the locks, and the
> maintenence of the list.  This should give a slight performance gain,
> and a small memory size gain.
>
> Or is that a step too far?
>
> ==John ffitch
>
> ------------------------------------------------------------------------------
> This SF.Net email is sponsored by the Verizon Developer Community
> Take advantage of Verizon's best-in-class app development support
> A streamlined, 14 day to market process makes app distribution fast and 
> easy
> Join now and get one step closer to millions of Verizon customers
> http://p.sf.net/sfu/verizon-dev2dev
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
> 


------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2009-12-30 21:37
FromErik de Castro Lopo
SubjectRe: [Cs-dev] Memory allocation -- a radical suggestion
michael.gogins@gmail.com wrote:

> I suggest rather replacing all Csound memory allocation with 
> garbage-collected memory allocation. Then turn off the garbage collection, 
> optionally, during performance. Nothing could be easier, safer, or 
> optionally faster and more glitch-free.
> 
> http://www.hpl.hp.com/personal/Hans_Boehm/gc/

I'm  not an expert on this at all but I have heard that th Boehm GC
does have some problems.

The Samba people have come up with talloc a heirarchical pool based 
memory allocator:

   http://talloc.samba.org/
   http://samba.org/ftp/unpacked/talloc/talloc_guide.txt

I've heard nothing but good things about talloc.

Erik
-- 
----------------------------------------------------------------------
Erik de Castro Lopo
http://www.mega-nerd.com/

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net