mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 00:11:26 +00:00
memory usage interrogation
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@38799 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
1ab490d19a
commit
841ddf78e0
17 changed files with 428 additions and 16 deletions
|
@ -387,6 +387,7 @@ static Class GSInlineArrayClass;
|
|||
state->state += count;
|
||||
return count;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
#if !GS_WITH_GC
|
||||
|
@ -970,6 +971,23 @@ static Class GSInlineArrayClass;
|
|||
state->itemsPtr = stackbuf;
|
||||
return count;
|
||||
}
|
||||
|
||||
- (NSUInteger) sizeInBytes: (NSHashTable*)exclude
|
||||
{
|
||||
NSUInteger size = GSPrivateMemorySize(self, exclude);
|
||||
|
||||
if (size > 0)
|
||||
{
|
||||
NSUInteger count = _count;
|
||||
|
||||
size += _capacity*sizeof(void*);
|
||||
while (count-- > 0)
|
||||
{
|
||||
size += [[self objectAtIndex: count] sizeInBytes: exclude];
|
||||
}
|
||||
}
|
||||
return size;
|
||||
}
|
||||
@end
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue