Dircache: Change internal cache layout.
commita3876f7c280fcbe498404d07c5ede3578cc8d6fa
authorThomas Martitz <thomas.martitz@student.htw-berlin.de>
Sat, 28 May 2011 23:39:09 +0000 (29 01:39 +0200)
committerThomas Martitz <thomas.martitz@student.htw-berlin.de>
Sat, 28 May 2011 23:39:09 +0000 (29 01:39 +0200)
treea5bed08aa9fa7c0d1182eb9d05ac25091264c0e9
parentbebe772ea0323ba8e6bb427940abd7b1f30d49d0
Dircache: Change internal cache layout.

The dircache_entry structs are now allocated subsequently from the front, allowing to treat them as an array.  The d_names are allocated from the back (in reverse order, growing downwards).
This allows the cache to be moved around (needed for my buflib gsoc project). It is utilized when loading the cache from disk (on the h100), now the pointer to the cache begin doesn't need to be the same across reboots anymore.

This should save a bit memory usage, since there's no need for aligning padding bytes after d_names anymore.
firmware/common/dircache.c
firmware/include/dircache.h