lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 12 Mar 2013 20:08:17 +0000
From:	Dimitris Papastamos <dp@...nsource.wolfsonmicro.com>
To:	Mark Brown <broonie@...nsource.wolfsonmicro.com>
Cc:	patches@...nsource.wolfsonmicro.com, linux-kernel@...r.kernel.org
Subject: Re: [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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ