Article View: comp.sys.mac.programmer.codewarrior
Article #1403Re: MP-safe MSL/new()
From: Karsten Loeffler
Date: Fri, 06 Oct 2000 00:00
Date: Fri, 06 Oct 2000 00:00
47 lines
2148 bytes
2148 bytes
Thank you both, howard an graham. I'll give the first try to the recompile-C-lib-method. But there's a problem: While I found the project 'MSL C.PPC.MTrgt.mcp', I haven't found one for Carbon (MSL C.Carbon.Lib). Where is it? And a another question (regarding pool_alloc.mac.c): Is it legal to free every pointer in __sys_free(...) where MPGetAllocatedBlockSize(ptr) returns not NULL ? And free the remaining with DisposePtr(ptr)? thanks in advance, karsten In article <hinnant-0510001154380001@ith3-473.twcny.rr.com>, hinnant@anti-spam_metrowerks.com (Howard Hinnant) wrote: > In article > <karsten.loeffler-7D396D.15575505102000@newsserv.uni-tuebingen.de>, > Karsten Loeffler <karsten.loeffler@uni-tuebingen.de> wrote: > > | Are there plans at Metrowerks to make the MSL - especially the 'MSL > | C++.PPC.Lib' - MP-safe? > | That means, to use MPAllocateAligned(...) in the operator new() > | methods. > > Yes, there are plans to migrate to use of the MPxxx calls. Note that > this > will break compatibility with earlier Mac OS's, so it will first probably > be offered as an option. > > However, there is really no need for you to wait. In the shipping > configuration, new simply forwards to malloc. And malloc has a single > entry point into the OS in pool_alloc.mac.c: __sys_alloc and __sys_free. > You can simply substitute calls to the MPxxx functions and recompile the > C > lib. > > [snip]
Technical Details
Message-ID:
<karsten.loeffler-E694CB.17013406102000@news.belwue.de>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<karsten.loeffler-7D396D.15575505102000@newsserv.uni-tuebingen.de> <hinnant-0510001154380001@ith3-473.twcny.rr.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10bcce,6951f08fa8b3ff8d X-Google-Attributes: gid10bcce,public X-Google-Thread: f635e,6951f08fa8b3ff8d X-Google-Attributes: gidf635e,public From: Karsten Loeffler <karsten.loeffler@uni-tuebingen.de> Subject: Re: MP-safe MSL/new() Date: 2000/10/06 Message-ID: <karsten.loeffler-E694CB.17013406102000@news.belwue.de> X-Deja-AN: 678315535 References: <karsten.loeffler-7D396D.15575505102000@newsserv.uni-tuebingen.de> <hinnant-0510001154380001@ith3-473.twcny.rr.com> Organization: University Tuebingen User-Agent: MT-NewsWatcher/3.0 (PPC) Newsgroups: comp.sys.mac.programmer.codewarrior,codewarrior.mac