improve reportingn of memory usage

This commit is contained in:
Richard Frith-Macdonald 2019-06-11 14:07:10 +01:00
parent 42b404c586
commit 3f7d54a33f
18 changed files with 395 additions and 267 deletions

View file

@ -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