mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 08:21:25 +00:00
tweak GC for improved performance and debugging
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@28129 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
4e2efb55dc
commit
0807ecd3d6
2 changed files with 8 additions and 2 deletions
|
@ -1753,6 +1753,10 @@ NSReallocateCollectable(void *ptr, NSUInteger size, NSUInteger options)
|
|||
}
|
||||
#else
|
||||
|
||||
#if defined(DEBUG)
|
||||
#define GC_DEBUG 1
|
||||
#endif
|
||||
|
||||
#include <gc.h>
|
||||
|
||||
/*
|
||||
|
@ -1784,7 +1788,7 @@ NSAllocateCollectable(NSUInteger size, NSUInteger options)
|
|||
}
|
||||
else
|
||||
{
|
||||
ptr = (void*)GC_MALLOC(size);
|
||||
ptr = (void*)GC_MALLOC_IGNORE_OFF_PAGE(size);
|
||||
memset(ptr, '\0', size);
|
||||
}
|
||||
}
|
||||
|
@ -1796,7 +1800,7 @@ NSAllocateCollectable(NSUInteger size, NSUInteger options)
|
|||
}
|
||||
else
|
||||
{
|
||||
ptr = (void*)GC_MALLOC_ATOMIC(size);
|
||||
ptr = (void*)GC_MALLOC_ATOMIC_IGNORE_OFF_PAGE(size);
|
||||
memset(ptr, '\0', size);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue