mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
GC tweaks
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@27854 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
88183aa33c
commit
c6257091ce
4 changed files with 19 additions and 0 deletions
|
@ -1,3 +1,9 @@
|
|||
2009-02-12 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSPortCoder.m: Use scanned memory to hold array
|
||||
* Source/NSKeyedUnarchiver.m: ditto
|
||||
* Source/NSFileManager.m: ditto
|
||||
|
||||
2009-02-11 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSUnarchiver.m:
|
||||
|
|
|
@ -2103,7 +2103,11 @@ static inline void gsedRelease(GSEnumeratedDirectory X)
|
|||
self = [super init];
|
||||
|
||||
_mgr = RETAIN(mgr);
|
||||
#if GS_WITH_GC
|
||||
_stack = NSAllocateCollectable(sizeof(GSIArray_t), NSScannedOption);
|
||||
#else
|
||||
_stack = NSZoneMalloc([self zone], sizeof(GSIArray_t));
|
||||
#endif
|
||||
GSIArrayInitWithZoneAndCapacity(_stack, [self zone], 64);
|
||||
|
||||
_flags.isRecursive = recurse;
|
||||
|
|
|
@ -798,7 +798,11 @@ static NSMapTable globalClassMap = 0;
|
|||
|
||||
_clsMap = NSCreateMapTable(NSObjectMapKeyCallBacks,
|
||||
NSNonOwnedPointerMapValueCallBacks, 0);
|
||||
#if GS_WITH_GC
|
||||
_objMap = NSAllocateCollectable(sizeof(GSIArray_t), NSScannedOption);
|
||||
#else
|
||||
_objMap = NSZoneMalloc(_zone, sizeof(GSIArray_t));
|
||||
#endif
|
||||
count = [_objects count];
|
||||
GSIArrayInitWithZoneAndCapacity(_objMap, _zone, count);
|
||||
// Add marker for nil object
|
||||
|
|
|
@ -1802,7 +1802,12 @@ static IMP _xRefImp; /* Serialize a crossref. */
|
|||
*/
|
||||
if (firstTime == YES)
|
||||
{
|
||||
#if GS_WITH_GC
|
||||
_clsAry
|
||||
= NSAllocateCollectable(sizeof(GSIArray_t)*3, NSScannedOption);
|
||||
#else
|
||||
_clsAry = NSZoneMalloc(_zone, sizeof(GSIArray_t)*3);
|
||||
#endif
|
||||
_objAry = &_clsAry[1];
|
||||
_ptrAry = &_clsAry[2];
|
||||
GSIArrayInitWithZoneAndCapacity(_clsAry, _zone, sizeC);
|
||||
|
|
Loading…
Reference in a new issue