mirror of
https://github.com/gnustep/libs-base.git
synced 2025-06-02 17:41:05 +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
|
@ -1980,6 +1980,18 @@ failure:
|
|||
}
|
||||
return NO;
|
||||
}
|
||||
|
||||
- (NSUInteger) sizeInBytes: (NSHashTable*)exclude
|
||||
{
|
||||
NSUInteger size = [super sizeInBytes: exclude];
|
||||
|
||||
if (size > 0)
|
||||
{
|
||||
size += [self length];
|
||||
}
|
||||
return size;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
/**
|
||||
|
@ -3282,6 +3294,13 @@ getBytes(void* dst, void* src, unsigned len, unsigned limit, unsigned *pos)
|
|||
}
|
||||
}
|
||||
|
||||
- (NSUInteger) sizeInBytes: (NSHashTable*)exclude
|
||||
{
|
||||
NSUInteger size = GSPrivateMemorySize(self, exclude);
|
||||
|
||||
return size;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
||||
|
@ -3339,6 +3358,17 @@ getBytes(void* dst, void* src, unsigned len, unsigned limit, unsigned *pos)
|
|||
return self;
|
||||
}
|
||||
|
||||
- (NSUInteger) sizeInBytes: (NSHashTable*)exclude
|
||||
{
|
||||
NSUInteger size = GSPrivateMemorySize(self, exclude);
|
||||
|
||||
if (size > 0)
|
||||
{
|
||||
size += length;
|
||||
}
|
||||
return size;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
#if GS_WITH_GC
|
||||
|
@ -4162,6 +4192,17 @@ getBytes(void* dst, void* src, unsigned len, unsigned limit, unsigned *pos)
|
|||
length = size;
|
||||
}
|
||||
|
||||
- (NSUInteger) sizeInBytes: (NSHashTable*)exclude
|
||||
{
|
||||
NSUInteger size = GSPrivateMemorySize(self, exclude);
|
||||
|
||||
if (size > 0)
|
||||
{
|
||||
size += capacity;
|
||||
}
|
||||
return size;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
#if GS_WITH_GC
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue