summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2008-08-10 12:46:15 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2008-08-10 12:46:15 +0000
commiteb0137fcb516f9b95d0f359fe1327ac7484abc0c (patch)
tree36a03540d41b6d5fc864caef229c939f2d63100a
parent8c913fb22be8af62c4a10d8dcc54cad263a7608c (diff)
downloadrockbox-eb0137fcb516f9b95d0f359fe1327ac7484abc0c.zip
rockbox-eb0137fcb516f9b95d0f359fe1327ac7484abc0c.tar.gz
rockbox-eb0137fcb516f9b95d0f359fe1327ac7484abc0c.tar.bz2
rockbox-eb0137fcb516f9b95d0f359fe1327ac7484abc0c.tar.xz
"waste" a bit more RAM on targets with more than 8MB so more directories can be opened at the same time (most obvious when you have really deep directory trees)
closes FS#6410, FS#6512, FS#6514 git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18234 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/common/dir_uncached.c4
-rw-r--r--firmware/common/dircache.c4
2 files changed, 8 insertions, 0 deletions
diff --git a/firmware/common/dir_uncached.c b/firmware/common/dir_uncached.c
index e036c95..1de81bd 100644
--- a/firmware/common/dir_uncached.c
+++ b/firmware/common/dir_uncached.c
@@ -27,7 +27,11 @@
#include "dir.h"
#include "debug.h"
+#if ((defined(MEMORYSIZE) && (MEMORYSIZE > 8)) || MEM > 8)
+#define MAX_OPEN_DIRS 16
+#else
#define MAX_OPEN_DIRS 8
+#endif
static DIR_UNCACHED opendirs[MAX_OPEN_DIRS];
diff --git a/firmware/common/dircache.c b/firmware/common/dircache.c
index 313102b..4eb97ce 100644
--- a/firmware/common/dircache.c
+++ b/firmware/common/dircache.c
@@ -49,7 +49,11 @@
#define DIRCACHE_BUILD 1
#define DIRCACHE_STOP 2
+#if ((defined(MEMORYSIZE) && (MEMORYSIZE > 8)) || MEM > 8)
+#define MAX_OPEN_DIRS 16
+#else
#define MAX_OPEN_DIRS 8
+#endif
static DIR_CACHED opendirs[MAX_OPEN_DIRS];
static struct dircache_entry *fd_bindings[MAX_OPEN_FILES];