mirror of
https://github.com/gnustep/libs-performance.git
synced 2025-02-19 18:11:16 +00:00
Implement -sizeInBytesExcluding: on GSFIFO
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/performance/trunk@38809 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
3859653420
commit
74d1c92669
2 changed files with 21 additions and 1 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
2015-07-16 Niels Grewe <niels.grewe@halbordnung.de>
|
||||||
|
|
||||||
|
* GSFIFO.m: Implement -sizeInBytesExcluding:
|
||||||
|
|
||||||
2015-07-15 Richard Frith-Macdonald <rfm@gnu.org>
|
2015-07-15 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
* GSCache.m: Experimental change (use in conjunction with gnustep-base
|
* GSCache.m: Experimental change (use in conjunction with gnustep-base
|
||||||
|
|
18
GSFIFO.m
18
GSFIFO.m
|
@ -209,7 +209,7 @@ stats(NSTimeInterval ti, uint32_t max, NSTimeInterval *bounds, uint64_t *bands)
|
||||||
// We do not need to signal the condition because
|
// We do not need to signal the condition because
|
||||||
// nothing about the qeuue did change
|
// nothing about the qeuue did change
|
||||||
[condition unlock];
|
[condition unlock];
|
||||||
return NULL;;
|
return NULL;
|
||||||
}
|
}
|
||||||
void *ptr = _items[_tail % _capacity];
|
void *ptr = _items[_tail % _capacity];
|
||||||
[condition unlock];
|
[condition unlock];
|
||||||
|
@ -900,5 +900,21 @@ stats(NSTimeInterval ti, uint32_t max, NSTimeInterval *bounds, uint64_t *bands)
|
||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (NSUInteger)sizeInBytesExcluding: (NSHashTable*)excluding
|
||||||
|
{
|
||||||
|
NSUInteger size = 0;
|
||||||
|
if (0 == (size = [super sizeInBytesExcluding: excluding]))
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
return size
|
||||||
|
+ (_capacity * sizeof(void)) // item storage
|
||||||
|
+ (boundsCount * sizeof(NSTimeInterval)) // boundaries
|
||||||
|
+ (2 * (boundsCount + 1) * sizeof(uint64_t)) // get and put counts
|
||||||
|
+ [condition sizeInBytesExcluding: excluding]
|
||||||
|
+ [name sizeInBytesExcluding: excluding]
|
||||||
|
+ [putThread sizeInBytesExcluding: excluding]
|
||||||
|
+ [getThread sizeInBytesExcluding: excluding];
|
||||||
|
}
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue