lkml.org 
[lkml]   [2013]   [Mar]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] regmap: Expose total memory consumption in the rbtree debugfs entry
On Tue, Mar 12, 2013 at 06:12:47PM +0000, Mark Brown wrote:
> On Tue, Mar 12, 2013 at 05:26:49PM +0000, Dimitris Papastamos wrote:
>
> > + mem_size = sizeof(*rbtree_ctx);
> > +
> > for (node = rb_first(&rbtree_ctx->root); node != NULL;
> > node = rb_next(node)) {
> > n = container_of(node, struct regcache_rbtree_node, node);
> > + mem_size += sizeof(*n);
> > + mem_size += (n->blklen * map->cache_word_size);
>
> This appears to ignore the size of the node structure and only have the
> root context and the data.

I've got mem_size += sizeof(*n) which is the size of the rbnode. That
contains the underlying rbtree node links.

Thanks,
Dimitris


\
 
 \ /
  Last update: 2013-03-12 22:02    [W:0.150 / U:0.312 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site