Author: thebeing
Date: Thu Jul 16 14:57:56 2015
New Revision: 38809

URL: http://svn.gna.org/viewcvs/gnustep?rev=38809&view=rev
Log:
Implement -sizeInBytesExcluding: on GSFIFO

Modified:
    libs/performance/trunk/ChangeLog
    libs/performance/trunk/GSFIFO.m

Modified: libs/performance/trunk/ChangeLog
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/performance/trunk/ChangeLog?rev=38809&r1=38808&r2=38809&view=diff
==============================================================================
--- libs/performance/trunk/ChangeLog    (original)
+++ libs/performance/trunk/ChangeLog    Thu Jul 16 14:57:56 2015
@@ -1,3 +1,7 @@
+2015-07-16 Niels Grewe <[email protected]>
+
+       * GSFIFO.m: Implement -sizeInBytesExcluding:
+
 2015-07-15 Richard Frith-Macdonald  <[email protected]>
 
        * GSCache.m: Experimental change (use in conjunction with gnustep-base

Modified: libs/performance/trunk/GSFIFO.m
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/performance/trunk/GSFIFO.m?rev=38809&r1=38808&r2=38809&view=diff
==============================================================================
--- libs/performance/trunk/GSFIFO.m     (original)
+++ libs/performance/trunk/GSFIFO.m     Thu Jul 16 14:57:56 2015
@@ -209,7 +209,7 @@
       // We do not need to signal the condition because
       // nothing about the qeuue did change
       [condition unlock];
-      return NULL;;
+      return NULL;
     }
   void *ptr = _items[_tail % _capacity];
   [condition unlock];
@@ -900,5 +900,21 @@
   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
 


_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs

Reply via email to