mirror of
https://github.com/Rockbox/rockbox.git
synced 2026-05-12 11:43:16 -04:00
dircache: increase stack size to avoid stack overflows
On FS#13821, a test build with -fstack-protector-all (which adds 4 bytes of stack to each function, roughly) overflowed the dircache stack on the Hifiwalker H2. In my own testing, the dircache thread hit 94% stack use on the Fiio M3K using the same settings. That seems a bit too close to the limit, especially since the dircache uses recursion and might consume more stack space for deeply nested directories. Adding 768 bytes should provide enough of a safety margin. This increases the stack size from 1.25k to 2k on most targets, including all X1000 targets. Change-Id: I900c19da9fb33f539d02b00830aedeb15c7449e2
This commit is contained in:
parent
d815053360
commit
e661c35b29
1 changed files with 1 additions and 1 deletions
|
|
@ -44,7 +44,7 @@
|
||||||
the limiting factor is the scanning thread stack size, not the
|
the limiting factor is the scanning thread stack size, not the
|
||||||
implementation -- tune the two together */
|
implementation -- tune the two together */
|
||||||
#define DIRCACHE_MAX_DEPTH 15
|
#define DIRCACHE_MAX_DEPTH 15
|
||||||
#define DIRCACHE_STACK_SIZE (DEFAULT_STACK_SIZE + 0x100)
|
#define DIRCACHE_STACK_SIZE (DEFAULT_STACK_SIZE + 0x400)
|
||||||
|
|
||||||
/* memory buffer constants that control allocation */
|
/* memory buffer constants that control allocation */
|
||||||
#define DIRCACHE_RESERVE (1024*64) /* 64 KB - new entry slack */
|
#define DIRCACHE_RESERVE (1024*64) /* 64 KB - new entry slack */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue