How to use the memory of MALLOC_CAP_INTERNAL ?
Posted: Thu Oct 25, 2018 4:54 am
I recently get OOM issue,
heap_caps_get_free_size(MALLOC_CAP_DEFAULT) returns 112
heap_caps_get_free_size(MALLOC_CAP_INTERNAL) returns 70284
I want to use the MALLOC_CAP_INTERNAL ,
but ,
heap_caps_malloc(size, MALLOC_CAP_DEFAULT) return 0
malloc(size) return 0
heap_caps_malloc(size, MALLOC_CAP_8BIT) return 0
heap_caps_malloc(size, MALLOC_CAP_INTERNAL|MALLOC_CAP_8BIT) return 0
heap_caps_malloc(size, MALLOC_CAP_DMA) return 0
heap_caps_malloc(size, MALLOC_CAP_INTERNAL|MALLOC_CAP_DMA) return 0
----
heap_caps_malloc(size, MALLOC_CAP_INTERNAL) return OK
but the memory caused
Guru Meditation Error: Core 1 panic'ed (LoadStoreError). Exception was unhandled.
----
I don't know why it reserved 70K MALLOC_CAP_INTERNAL ,
Is there any config settings that can reduce the size of MALLOC_CAP_INTERNAL ?
Thanks.
heap_caps_get_free_size(MALLOC_CAP_DEFAULT) returns 112
heap_caps_get_free_size(MALLOC_CAP_INTERNAL) returns 70284
I want to use the MALLOC_CAP_INTERNAL ,
but ,
heap_caps_malloc(size, MALLOC_CAP_DEFAULT) return 0
malloc(size) return 0
heap_caps_malloc(size, MALLOC_CAP_8BIT) return 0
heap_caps_malloc(size, MALLOC_CAP_INTERNAL|MALLOC_CAP_8BIT) return 0
heap_caps_malloc(size, MALLOC_CAP_DMA) return 0
heap_caps_malloc(size, MALLOC_CAP_INTERNAL|MALLOC_CAP_DMA) return 0
----
heap_caps_malloc(size, MALLOC_CAP_INTERNAL) return OK
but the memory caused
Guru Meditation Error: Core 1 panic'ed (LoadStoreError). Exception was unhandled.
----
I don't know why it reserved 70K MALLOC_CAP_INTERNAL ,
Is there any config settings that can reduce the size of MALLOC_CAP_INTERNAL ?
Thanks.