summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Wilgus <wilgus.william@gmail.com>2022-10-30 11:55:07 -0400
committerWilliam Wilgus <me.theuser@yahoo.com>2022-11-14 08:21:29 -0500
commitf94a14b85917787523b23f1031193858741f4d7b (patch)
treefb1b00bb084fe6d404ee87d9c2a1129a6837d256
parentc088a9453df5fd866f2b1fd5347936c1e015d4f5 (diff)
downloadrockbox-f94a14b859.tar.gz
rockbox-f94a14b859.zip
increase the number of file & directory handles for devices with more ram
Change-Id: I06f517b3b1388aa43fe1aa9edae53c92d0b137e8
-rw-r--r--firmware/include/fs_defines.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/firmware/include/fs_defines.h b/firmware/include/fs_defines.h
index a1938c56b8..f4c8385d8a 100644
--- a/firmware/include/fs_defines.h
+++ b/firmware/include/fs_defines.h
@@ -45,8 +45,15 @@
/* limits for number of open descriptors - if you increase these values, make
certain that the disk cache has enough available buffers */
+
+#if MEMORYSIZE < 8
#define MAX_OPEN_FILES 11
#define MAX_OPEN_DIRS 12
+#else
+#define MAX_OPEN_FILES 31
+#define MAX_OPEN_DIRS 32
+#endif /* MEMORYSIZE */
+
/* internal functions open streams as well; make sure they don't fail if all
user descs are busy; this needs to be at least the greatest quantity needed
@@ -96,10 +103,7 @@
#if MEMORYSIZE < 8
#define DC_NUM_ENTRIES 32
#define DC_MAP_NUM_ENTRIES 128
-#elif MEMORYSIZE <= 32
-#define DC_NUM_ENTRIES 48
-#define DC_MAP_NUM_ENTRIES 128
-#else /* MEMORYSIZE > 32 */
+#else
#define DC_NUM_ENTRIES 64
#define DC_MAP_NUM_ENTRIES 256
#endif /* MEMORYSIZE */