# Optimization heap ram

**URL:** https://forum.amebaiot.com/t/optimization-heap-ram/2034
**Category:** SDK
**Created:** [July 3, 2023, 5:03am UTC](https://forum.amebaiot.com/t/optimization-heap-ram/2034 "2023-07-03T05:03:11Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![vinhtran](https://avatars.discourse-cdn.com/v4/letter/v/958977/32.png) [@vinhtran](https://forum.amebaiot.com/u/vinhtran)
#### Post date: [July 3, 2023, 5:03am UTC](https://forum.amebaiot.com/t/optimization-heap-ram/2034/1 "2023-07-03T05:03:11Z")

</div>

Hi everyone!  
I am using kit AMB26(RTL8720DF) to develop a program using ble, wifi, mqtt, … I set my heap ram size is 260K in file FreeRTOSConfig.h. When i connect my device to wifi AP, run mqtt, run ble scan and run 6-7 task freeRTOS, my free heap size is only 24k. I checked and found wifi connect to AP use about 100k heap size. Can i optimization heap size used for wifi conection?  
Thank you!

---

<div class="post-metadata">

### Author: ![M-ichae-l](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.amebaiot.com/m-ichae-l/32/33_2.png) [@M-ichae-l](https://forum.amebaiot.com/u/M-ichae-l)
#### Post date: [October 2, 2023, 3:15am UTC](https://forum.amebaiot.com/t/optimization-heap-ram/2034/2 "2023-10-02T03:15:27Z")

</div>

Yes, you can modify heap size at “FreeRTOSConfig.h”. But WiFi heapsize is not recommend modifying.
