equal
deleted
inserted
replaced
333 } |
333 } |
334 |
334 |
335 // Total of all Chunks in arena |
335 // Total of all Chunks in arena |
336 size_t Arena::used() const { |
336 size_t Arena::used() const { |
337 size_t sum = _chunk->length() - (_max-_hwm); // Size leftover in this Chunk |
337 size_t sum = _chunk->length() - (_max-_hwm); // Size leftover in this Chunk |
338 register Chunk *k = _first; |
338 Chunk *k = _first; |
339 while( k != _chunk) { // Whilst have Chunks in a row |
339 while( k != _chunk) { // Whilst have Chunks in a row |
340 sum += k->length(); // Total size of this Chunk |
340 sum += k->length(); // Total size of this Chunk |
341 k = k->next(); // Bump along to next Chunk |
341 k = k->next(); // Bump along to next Chunk |
342 } |
342 } |
343 return sum; // Return total consumed space. |
343 return sum; // Return total consumed space. |