Search found 3 matches

by wbice123
Thu Aug 01, 2019 1:57 am
Forum: ESP-IDF
Topic: Change memory allocating behavior for a certain component (C++)
Replies: 4
Views: 5703

Re: Change memory allocating behavior for a certain component (C++)

No, not really as the heap allocator is a runtime thing. The only way I can imagine you can do this is to give all c++ objects used a custom allocator that manually allocates off the psram heap using heap_alloc_caps. I've done this work, and it do helps. The work was so boring, though. Thanks a lot.
by wbice123
Thu Aug 01, 2019 1:55 am
Forum: ESP-IDF
Topic: Change memory allocating behavior for a certain component (C++)
Replies: 4
Views: 5703

Re: Change memory allocating behavior for a certain component (C++)

Thank you so much @ jcsbanks The shrink_to_fit really helps, and it's a great idea for certain containers. At last, I tried to set a custom allocator for all container in this component. The work was boring, but helpful, and decreased about 10K bytes in internal memory. Happy to share my code if any...
by wbice123
Tue Jul 30, 2019 9:18 am
Forum: ESP-IDF
Topic: Change memory allocating behavior for a certain component (C++)
Replies: 4
Views: 5703

Change memory allocating behavior for a certain component (C++)

Hi, All: I got stuck in a problem when I'm integrating a component written in c++ into the project. This component consume a lot memory, both in heap and in stack. I've tried to move variables allocated in stack to heap, but it still consume too much memory in internal RAM. So, is there a viable me...