Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added macro for max open SPIFFS files, setting it to 1 saves about 1k heap #2167

Merged
merged 1 commit into from
Jun 20, 2016

Conversation

tijnkooijmans
Copy link
Contributor

@tijnkooijmans tijnkooijmans commented Jun 18, 2016

Since heap is so precious on this chip, I though this might be of use. Most applications I write don't need more then 1 file open simultaneously.

@tijnkooijmans tijnkooijmans changed the title added macro for max open SPIFFS files, settings it to 1 saves about 1k heap added macro for max open SPIFFS files, setting it to 1 saves about 1k heap Jun 18, 2016
@codecov-io
Copy link

Current coverage is 27.61%

Merging #2167 into master will not change coverage

@@             master      #2167   diff @@
==========================================
  Files            20         20          
  Lines          3686       3686          
  Methods         337        337          
  Messages          0          0          
  Branches        678        678          
==========================================
  Hits           1018       1018          
  Misses         2490       2490          
  Partials        178        178          

Powered by Codecov. Last updated by 1640cc3...8f7fbe6

@kaeferfreund
Copy link

like this one 👍

@igrr igrr merged commit 3b81557 into esp8266:master Jun 20, 2016
@reaper7
Copy link
Contributor

reaper7 commented Jun 20, 2016

I can define that value inside sketch?
#define SPIFFS_MAX_OPEN_FILES 2

@igrr
Copy link
Member

igrr commented Jun 21, 2016

@reaper7 you can, but it will not have any effect.
This needs to be defined when compiling core cpp files.
I suspect @tijnkooijmans is not using Arduino IDE to build the code, so he can add this define to compiler flags.

@tijnkooijmans
Copy link
Contributor Author

indeed, I use platformIO in which you can set build flags in platform.ini

@reaper7
Copy link
Contributor

reaper7 commented Jun 21, 2016

@igrr & @tijnkooijmans - thx for clarification

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants