[patch 10/15] fs/logfs/memtree.c

Arnd Bergmann arnd at arndb.de
Thu Apr 10 10:07:44 EDT 2008


On Tuesday 01 April 2008, joern at logfs.org wrote:
> +#if BITS_PER_LONG == 32
> +#define BTREE_NODES 20 /* 32bit, 240 byte nodes */
> +#else
> +#define BTREE_NODES 16 /* 64bit, 256 byte nodes */
> +#endif
> +
> +struct btree_node {
> +       u64 key;
> +       struct btree_node *node;
> +};

On 32 bit platforms other than x86, your struct btree_node
is 16 bytes long because of alignment requirements, rather
than the 12 bytes you are assuming.

	Arnd <><



More information about the linux-mtd mailing list