summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorAidan MacDonald <amachronic@protonmail.com>2022-10-27 10:54:19 +0100
committerAidan MacDonald <amachronic@protonmail.com>2022-10-27 11:10:47 +0100
commit4b7b7a0a838bb9952d07025f02e84ca549a2753e (patch)
tree45a9ec154f0c096f2af5b82e0b502c32647073d6 /apps
parentb677da6595eb233851829e1d53a2d34aecced792 (diff)
downloadrockbox-4b7b7a0a838bb9952d07025f02e84ca549a2753e.tar.gz
rockbox-4b7b7a0a838bb9952d07025f02e84ca549a2753e.zip
shortcuts: Reduce SHORTCUTS_PER_HANDLE to 4
The current value of 32 per handle seems excessive. Buflib overhead per handle is only 20 bytes and a single shortcut is > 500 bytes. Reducing SHORTCUTS_PER_HANDLE means that minimum memory usage can be lower when there are a few shortcuts, at the cost of marginally increased usage for large numbers of shortcuts. This is helpful to keep memory usage under control for low-memory targets, where 16 KiB is almost 1% of system RAM! Change-Id: I47dbe0da874ae512cf50a0bd8350576ab2fabdf4
Diffstat (limited to 'apps')
-rw-r--r--apps/shortcuts.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/shortcuts.c b/apps/shortcuts.c
index fd9d8d0949..85bf006646 100644
--- a/apps/shortcuts.c
+++ b/apps/shortcuts.c
@@ -80,7 +80,7 @@ struct shortcut {
80 } timedata; 80 } timedata;
81 } u; 81 } u;
82}; 82};
83#define SHORTCUTS_PER_HANDLE 32 83#define SHORTCUTS_PER_HANDLE 4
84struct shortcut_handle { 84struct shortcut_handle {
85 struct shortcut shortcuts[SHORTCUTS_PER_HANDLE]; 85 struct shortcut shortcuts[SHORTCUTS_PER_HANDLE];
86 int next_handle; 86 int next_handle;