Any hints for getting more task memory

User avatar
fly135
Posts: 606
Joined: Wed Jan 03, 2018 8:33 pm
Location: Orlando, FL

Any hints for getting more task memory

Postby fly135 » Tue Mar 20, 2018 8:32 pm

I'm running out of MALLOC_CAP_8BIT bit memory. I've been going through my app and trying to free up as much as I can. Reducing stack size where I can. Getting rid of .bss declared arrays and doing a dynamically alloc/free instead. Even to the point of allocating 32 bit and breaking it into 8 or 16 bit pieces to work with. Just wondering if there is anything in the SDK components that can be told to use 32 bit?

chegewara
Posts: 2240
Joined: Wed Jun 14, 2017 9:00 pm

Re: Any hints for getting more task memory

Postby chegewara » Tue Mar 20, 2018 9:20 pm

You can try to play with settings in menuconfig. WiFi buffers, mbedTLS buffer and some other settings. If you are using only bluetooh LE then you can free classic bluetooth stack or in case you are using just classic bluetooth you can free BLE stack. Logging also is taking some heap.

User avatar
fly135
Posts: 606
Joined: Wed Jan 03, 2018 8:33 pm
Location: Orlando, FL

Re: Any hints for getting more task memory

Postby fly135 » Tue Mar 20, 2018 9:59 pm

Yep, did all that. We are going to get SPIRAM, like is on the WROVER. Is that 32bit only? I'm under the impression that it is. Although if it caches in 8bit, then it wouldn't be? So maybe I can do 16 bit access on it. But not tasks?

John

User avatar
fly135
Posts: 606
Joined: Wed Jan 03, 2018 8:33 pm
Location: Orlando, FL

Re: Any hints for getting more task memory

Postby fly135 » Tue Mar 20, 2018 10:04 pm

Since BLE is only for configuring the device, I'm thinking that on boot if it's not configured then go into BLE mode. If is configured then go to normal mode. So I could avoid any BLE dynamic allocation in normal mode. But there might still be some static since it's linked.

John A

Who is online

Users browsing this forum: Baidu [Spider] and 218 guests