More GC tidyups

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@4953 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 1999-09-28 11:10:34 +00:00
parent c315156563
commit 11ef04f603
12 changed files with 72 additions and 57 deletions

View file

@ -81,7 +81,9 @@ GSDebugAllocationAdd(Class c)
if (num_classes >= table_size)
{
int more = table_size + 128;
table_entry* tmp = objc_malloc(more * sizeof(table_entry));
table_entry *tmp;
tmp = NSZoneMalloc(NSDefaultMallocZone(), more * sizeof(table_entry));
if (tmp == 0)
{
@ -90,7 +92,7 @@ GSDebugAllocationAdd(Class c)
if (the_table)
{
memcpy(tmp, the_table, num_classes * sizeof(table_entry));
objc_free(the_table);
NSZoneFree(NSDefaultMallocZone(), the_table);
}
the_table = tmp;
}
@ -170,9 +172,9 @@ GSDebugAllocationList(BOOL difference)
siz = pos;
if (buf)
{
objc_free(buf);
NSZoneFree(NSDefaultMallocZone(), buf);
}
buf = objc_malloc(siz);
buf = NSZoneMalloc(NSDefaultMallocZone(), siz);
}
if (buf)
@ -234,9 +236,9 @@ GSDebugAllocationListAll()
siz = pos;
if (buf)
{
objc_free(buf);
NSZoneFree(NSDefaultMallocZone(), buf);
}
buf = objc_malloc(siz);
buf = NSZoneMalloc(NSDefaultMallocZone(), siz);
}
if (buf)