-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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
pthread allow Stack on Spiram (IDFGH-7045) #8662
Comments
Certainly! But I'm afraid that the constructor of std::thread does not allow any additional parameters than the actual function to be executed in the thread. Maybe I missed something, so if you have another idea, please let me know! |
esp_pthread_set_cfg(&cfg) |
@f-hoepfinger-hr-agrartechnik @franz-ms-muc I see now (Should have looked at the example more thoroughly). Just to clarify: you would like a possibility to configure |
Hi, we did one implementation here: but i would not want to open a Pull Request as i feel the Quality is not good enough for a Pull request. it is "generally" running OK, so we use it in a Prototype. |
Ported same to 4.4.2 any outlook that we can get such in ESP-IDF ? |
will be here shortly. |
externalmemory option. Update components/pthread/include/esp_pthread.h Co-authored-by: Ivan Grokhotkov <[email protected]> Update components/pthread/pthread.c Co-authored-by: Ivan Grokhotkov <[email protected]> MALLOC_CAP_DEFAULT as default "External ram" is probably not a very future-proof flag, since some chips might have more types of memory: TCM, internal slower memory, external faster memory, external slower memory, retention-capable memory. Using MALLOC_CAPS macros provides the same amount of flexibility as available in the heap allocation APIs. Need to add free(stack_for_task); here free(stack_for_task); free(taskTC); here as well You also need to modify the pthread deletion code to free the memory, otherwise it would be leaked. this should be done together with deleting pthread structure
when you have a lot of Tasks,
internal Memory might be used up fast.
now,
https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/kconfig.html#config-spiram-allow-stack-external-memory
allow use of Stack on SPIRAM.
but not via C++ Pthreads.
https://github.com/espressif/esp-idf/tree/master/examples/cxx/pthread
would be a nice Extension right ?
Thanks,
Franz
The text was updated successfully, but these errors were encountered: