public Option < Long > getNumberOfAllocatedBytes ( ) throws NoSuchFieldException , IllegalAccessException { if ( directArenas != null ) { long numChunks = 0 ; for ( Object arena : directArenas ) { numChunks += getNumberOfAllocatedChunks ( arena , "qInit" ) ; numChunks += getNumberOfAllocatedChunks ( arena , "q000" ) ; numChunks += getNumberOfAllocatedChunks ( arena , "q025" ) ; numChunks += getNumberOfAllocatedChunks ( arena , "q050" ) ; numChunks += getNumberOfAllocatedChunks ( arena , "q075" ) ; numChunks += getNumberOfAllocatedChunks ( arena , "q100" ) ; } long allocatedBytes = numChunks * chunkSize ; return Option . apply ( allocatedBytes ) ; } else { return Option . empty ( ) ; } }
Returns the number of currently allocated bytes .