Search found 7 matches

by commarmi76
Mon May 01, 2017 9:35 pm
Forum: General Discussion
Topic: pvPortMallocCaps with MALLOC_CAP_32BI and memset
Replies: 9
Views: 13990

Re: pvPortMallocCaps with MALLOC_CAP_32BI and memset

if your stack isn't big enough, your variable cant be allocated or will overflow your task stack. You have a overflow there, you declare a big two dimensional array in a function that overwrites that array. Right?

Yes. Is there any method to check this kind of overflow implemented in freertos ?
I ...
by commarmi76
Sat Apr 29, 2017 4:12 pm
Forum: General Discussion
Topic: same sdkconfig but different memory layouts
Replies: 4
Views: 6850

Re: same sdkconfig but different memory layouts

Hello,

surprisingly it is something related to the code. If I put a "return 0" before the lame_init_params here: https://github.com/commarmi76/libmp3lame_for_esp32/blob/master/main/lame_test.c#L63 the memory layout is correct.

I wonder what related to the code can change memory layout ?
Some kind ...
by commarmi76
Fri Apr 28, 2017 8:18 am
Forum: General Discussion
Topic: pvPortMallocCaps with MALLOC_CAP_32BI and memset
Replies: 9
Views: 13990

Re: pvPortMallocCaps with MALLOC_CAP_32BI and memset

Hello,

you can see here: https://github.com/commarmi76/libmp3lame_for_esp32/blob/d210b2caebcde6d09649647e5865fa21a3cbf6ba/components/libmp3lame/library/psymodel.c#L1820
If I don't set CONFIG_MAIN_TASK_STACK_SIZE with enough memory this line don't crash but when the code reaches the memset below the ...
by commarmi76
Thu Apr 27, 2017 9:18 pm
Forum: General Discussion
Topic: same sdkconfig but different memory layouts
Replies: 4
Views: 6850

same sdkconfig but different memory layouts

Hello,

I've two project with the same sdkconfig and created using esp-idf-template. When I flash and run monitor, the memory layout presented by the boot process are different.

Let me show:

I (1428) cpu_start: Pro cpu up.
I (1428) cpu_start: Single core mode
I (1429) heap_alloc_caps ...
by commarmi76
Mon Apr 24, 2017 4:59 am
Forum: General Discussion
Topic: pvPortMallocCaps with MALLOC_CAP_32BI and memset
Replies: 9
Views: 13990

Re: pvPortMallocCaps with MALLOC_CAP_32BI and memset

Very exciting port!

Memset (and the similar newlib functions) should use only 32-bit word operations (for performance) as long as the argument buffer is at a 32-bit aligned address & is a 32-bit multiple of length. So if you're memsetting the entire buffer, this will be safe.

You can read the ...
by commarmi76
Mon Apr 24, 2017 4:41 am
Forum: General Discussion
Topic: pvPortMallocCaps with MALLOC_CAP_32BI and memset
Replies: 9
Views: 13990

Re: pvPortMallocCaps with MALLOC_CAP_32BI and memset

@ESP_Angus:
You are right, I use MALLOC_CAP_32BITS because Lame creates a lot of buffers but two at the begining are specially big (48k echa one). Fortunately these are int buffers. You can see memory info at the start of the lame_test.c:

ESP32 SDK version:v2.0-rc1-590-g0ea4c3c0, RAM left 180060 ...
by commarmi76
Sun Apr 23, 2017 10:17 pm
Forum: General Discussion
Topic: pvPortMallocCaps with MALLOC_CAP_32BI and memset
Replies: 9
Views: 13990

pvPortMallocCaps with MALLOC_CAP_32BI and memset

Hello,

I ported lame (libmp3lame) mp3 encode to esp32. I'm using pvPortMallocCaps with MALLOC_CAP_32BIT to get memory for two big int arrays. I wonder if I can use memset to initialize this arrays because according the documentation, memory allocated with MALLOC_CAP_32BIT needs to be accessed in ...

Go to advanced search