mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 16:30:41 +00:00
minor fixups to last lot of GC changes
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@27786 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
b44f3f55ce
commit
8a72bcc0e9
3 changed files with 26 additions and 5 deletions
|
@ -281,9 +281,16 @@ static Observation *obsNew(NCTable* t)
|
|||
unsigned size;
|
||||
|
||||
t->numChunks++;
|
||||
|
||||
size = t->numChunks * sizeof(Observation*);
|
||||
#if GS_WITH_GC
|
||||
t->chunks = (Observation**)NSReallocateCollectable(
|
||||
t->chunks, size, NSScannedOption);
|
||||
#else
|
||||
t->chunks = (Observation**)NSZoneRealloc(NSDefaultMallocZone(),
|
||||
t->chunks, size);
|
||||
#endif
|
||||
|
||||
size = CHUNKSIZE * sizeof(Observation);
|
||||
#if GS_WITH_GC
|
||||
t->chunks[t->numChunks - 1]
|
||||
|
@ -327,7 +334,9 @@ static GSIMapTable mapNew(NCTable *t)
|
|||
static void mapFree(NCTable *t, GSIMapTable m)
|
||||
{
|
||||
if (t->cacheIndex < CACHESIZE)
|
||||
t->cache[t->cacheIndex++] = m;
|
||||
{
|
||||
t->cache[t->cacheIndex++] = m;
|
||||
}
|
||||
else
|
||||
{
|
||||
GSIMapEmptyMap(m);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue