MacOS-X compatibility fix for GC

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@27845 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2009-02-11 10:11:33 +00:00
parent d3da55f975
commit d2fa82f877
4 changed files with 12 additions and 12 deletions

View file

@ -148,7 +148,7 @@ static NSHashTable *uncollectable = 0;
- (NSZone*) zone
{
return GSAtomicMallocZone();
return NSDefaultMallocZone();
}
@end

View file

@ -668,14 +668,9 @@ NSIncrementExtraRefCount(id anObject)
inline NSZone *
GSObjCZone(NSObject *object)
{
/* If we have GC enabled, all objects are garbage collected and memory
* they allocate should generally be garbage collectable but not scanned
* for pointers.
* If an object wants to have memory which IS scanned for pointers by the
* garbage collector, it should use NSAllocateCollectable() to get it,
* rather than using the old zone based memory allocation.
/* MacOS-X 10.5 seems to return the default malloc zone if GC is enabled.
*/
return GSAtomicMallocZone();
return NSDefaultMallocZone();
}
static void