Document zombie stuff

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@13625 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
CaS 2002-05-10 17:05:10 +00:00
parent 3f1f110b1a
commit 1f21038834
2 changed files with 26 additions and 6 deletions

View file

@ -285,6 +285,26 @@
value locates the final subdirectory used to locate binaries.
</p>
</desc>
<term>NSDeallocateZombies</term>
<desc>
This may be used in conjunction with NSZombieEnabled to specify
whether the objects should really be deallocated. If you set
this tom YES, the zombie logging will only work until the
deallocated memory is re-used.
</desc>
<term>NSZombieEnabled</term>
<desc>
<p>
If this is set to YES, then deallocation of an object causes
the object to be morphes into a Zombie ... a special object
which will call the GNUstep specific GSLogZombie() function
to log the method call.<br />
You can set a breakpoint in this function and examine the
process memory if you are running undera debugger.<br />
As this overrides actual object deallocation, all memory
allocated for objects will be leaked!
</p>
</desc>
<term>TZ</term>
<desc>
<p>

View file

@ -371,7 +371,7 @@ setup()
me = (ivars)NSAllocateObject(GSCInlineStringClass, length,
GSObjCZone(self));
me->_contents.c = (char*)&((GSCInlineString*)me)[1];
me->_contents.c = (unsigned char*)&((GSCInlineString*)me)[1];
me->_count = length;
me->_flags.wide = 0;
memcpy(me->_contents.c, chars, length);
@ -402,7 +402,7 @@ setup()
ivars me;
me = (ivars)NSAllocateObject(GSCStringClass, 0, GSObjCZone(self));
me->_contents.c = chars;
me->_contents.c = (unsigned char*)chars;
me->_count = length;
me->_flags.wide = 0;
if (flag == YES)
@ -461,7 +461,7 @@ setup()
*/
me = (ivars)NSAllocateObject(GSCInlineStringClass,
length, GSObjCZone(self));
me->_contents.c = (char*)&((GSCInlineString*)me)[1];
me->_contents.c = (unsigned char*)&((GSCInlineString*)me)[1];
me->_count = length;
me->_flags.wide = 0;
memcpy(me->_contents.c, ((ivars)string)->_contents.c, length);
@ -680,7 +680,7 @@ compare_u(ivars self, NSString *aString, unsigned mask, NSRange aRange)
static inline char*
cString_c(ivars self)
{
char *r;
unsigned char *r;
if (self->_count == 0)
{
@ -688,7 +688,7 @@ cString_c(ivars self)
}
if (defEnc == intEnc)
{
r = (char*)_fastMallocBuffer(self->_count+1);
r = (unsigned char*)_fastMallocBuffer(self->_count+1);
if (self->_count > 0)
{
@ -925,7 +925,7 @@ doubleValue_c(ivars self)
else
{
unsigned len = self->_count < 32 ? self->_count : 31;
char buf[len+1];
unsigned char buf[len+1];
memcpy(buf, self->_contents.c, len);
buf[len] = '\0';