Hi Victor, Thanks for the reply. I found the mmalloc and mcalloc in Engine/memalloc.c but didn't check to see if they were #ifdef'd by platform. The mcalloc though in Csound in the memalloc.c file though does not take in the same args as calloc, instead initializing an x number of 1 byte elements, pretty much the same as malloc. So I guess the initialisation to 0 is really the only difference and I'm safe to use either as long as I'm initiailizing values anyways of the struct that is allocated. I guess maybe their usages become more idiomatic over time as to when to use either. Thanks! steven On 8/11/06, Victor Lazzarini wrote: > As far as I know, malloc and calloc are just different interfaces > to the same thing, with calloc being, as you said, preferred for > arrays as it initialises all elements to 0. > > mmalloc and mcalloc are as far as I can tell glibc only (they do not > feature on MS Windows), part of so-called 'memory-mapped' malloc > package. > > Victor > > At 11:09 11/08/2006, you wrote: > >Hi All, > > > >I was wondering today what the difference was between mmalloc and > >mcalloc is. It seems that one initializes to zeros while one doesn't. > > Since I'm no C expert, it seems to me that one would want to > >initialize everything in the struct after using either if allocating > >memory that's sizeof(struct) so what their starting state is wouldn't > >matter, so this is a little beyond me when to use which. > > > >Thanks! > >steven > > > >------------------------------------------------------------------------- > >Using Tomcat but need to do more? Need to support web services, security? > >Get stuff done quickly with pre-integrated technology to make your job easier > >Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > >http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > >_______________________________________________ > >Csound-devel mailing list > >Csound-devel@lists.sourceforge.net > >https://lists.sourceforge.net/lists/listinfo/csound-devel > > Victor Lazzarini > Music Technology Laboratory > Music Department > National University of Ireland, Maynooth > > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Csound-devel mailing list > Csound-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/csound-devel > ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net