Logo Search packages:      
Sourcecode: samba-doc-ja version File versions

void talloc_get_allocation ( TALLOC_CTX t,
size_t *  total_bytes,
int *  n_chunks 
)

Return an estimated memory usage for the specified pool. This does not include memory used by the underlying malloc implementation.

Definition at line 430 of file talloc.c.

References talloc_chunk::next, and talloc_chunk::size.

Referenced by talloc_describe_all().

{
      struct talloc_chunk *chunk;

      if (t) {
            *total_bytes = 0;
            *n_chunks = 0;

            for (chunk = t->list; chunk; chunk = chunk->next) {
                  n_chunks[0]++;
                  *total_bytes += chunk->size;
            }
      }
}


Generated by  Doxygen 1.6.0   Back to index