More moves towards OSX 10.5 GC compatibility.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@28054 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2009-03-09 15:11:51 +00:00
parent 00e2bbb843
commit bc9468c45f
25 changed files with 553 additions and 282 deletions

View file

@ -1780,10 +1780,12 @@ NSAllocateCollectable(NSUInteger size, NSUInteger options)
if (options & NSCollectorDisabledOption)
{
ptr = (void*)GC_MALLOC_UNCOLLECTABLE(size);
memset(ptr, '\0', size);
}
else
{
ptr = (void*)GC_MALLOC(size);
memset(ptr, '\0', size);
}
}
else
@ -1795,6 +1797,7 @@ NSAllocateCollectable(NSUInteger size, NSUInteger options)
else
{
ptr = (void*)GC_MALLOC_ATOMIC(size);
memset(ptr, '\0', size);
}
}
return ptr;
@ -1940,6 +1943,7 @@ NSZoneCalloc (NSZone *zone, NSUInteger elems, NSUInteger bytes)
if (zone == &atomic_zone)
{
ptr = (void*)GC_MALLOC_ATOMIC(size);
memset(ptr, '\0', size);
}
else
{