mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-23 21:52:13 +00:00
improve reportingn of memory usage
This commit is contained in:
parent
42b404c586
commit
3f7d54a33f
18 changed files with 395 additions and 267 deletions
|
@ -1964,25 +1964,6 @@ compare(id elem1, id elem2, void* context)
|
|||
passingTest: predicate];
|
||||
}
|
||||
|
||||
- (NSUInteger) sizeInBytesExcluding: (NSHashTable*)exclude
|
||||
{
|
||||
NSUInteger size = [super sizeInBytesExcluding: exclude];
|
||||
|
||||
if (size > 0)
|
||||
{
|
||||
NSUInteger count = [self count];
|
||||
GS_BEGINIDBUF(objects, count);
|
||||
|
||||
size += count*sizeof(void*);
|
||||
[self getObjects: objects];
|
||||
while (count-- > 0)
|
||||
{
|
||||
size += [objects[count] sizeInBytesExcluding: exclude];
|
||||
}
|
||||
GS_ENDIDBUF();
|
||||
}
|
||||
return size;
|
||||
}
|
||||
@end
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue