Dircache: Change internal cache layout.
commit52abbb186d62f113eb468754332840d54bd7e756
authorThomas Martitz <kugel@rockbox.org>
Mon, 20 Jun 2011 20:12:30 +0000 (20 20:12 +0000)
committerThomas Martitz <kugel@rockbox.org>
Mon, 20 Jun 2011 20:12:30 +0000 (20 20:12 +0000)
tree51ea81d81391e5b01c1d0cb684b61d22c6741a41
parentb67f4a1824602d18fbf28b7428bd12186f017f78
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.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30036 a1c6a512-1295-4272-9138-f99709370657
firmware/common/dircache.c
firmware/include/dircache.h