mirror of
https://github.com/pellepl/spiffs.git
synced 2026-08-28 04:40:08 +00:00
Limit cache size if too much cache is given
This commit is contained in:
@@ -91,7 +91,7 @@ s32_t SPIFFS_mount(spiffs *fs, spiffs_config *config, u8_t *work,
|
||||
}
|
||||
#if SPIFFS_CACHE
|
||||
fs->cache = cache;
|
||||
fs->cache_size = cache_size;
|
||||
fs->cache_size = (cache_size > (config->log_page_size*32)) ? config->log_page_size*32 : cache_size;
|
||||
spiffs_cache_init(fs);
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user