# configTOTAL\_HEAP\_SIZE increase

**URL:** <https://forums.freertos.org/t/configtotal-heap-size-increase/6376>\
**Category:** Kernel\
**Created:** [January 31, 2017, 10:09am UTC](https://forums.freertos.org/t/configtotal-heap-size-increase/6376 "2017-01-31T10:09:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [January 31, 2017, 10:09am UTC](https://forums.freertos.org/t/configtotal-heap-size-increase/6376/1 "2017-01-31T10:09:36Z")

</div>

**[kkoovalsky](https://sourceforge.net/u/kkoovalsky/)** wrote on [Tuesday, January 31, 2017](https://sourceforge.net/p/freertos/discussion/382005/thread/9b7cdec2/#8380):

I’m programming STM32F407VET which contains 192KB of RAM. Default value of configTOTAL\_HEAP\_SIZE is (size\_t)15360 (generated from CubeMX), so it’s 61,44 KB. So, why isn’t the rest of RAM used by default? Can I freely increase the size? I use heap\_4.c

---

<div class="post-metadata">

**Author:** ![rtel](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/rtel/32/31_2.png) [@rtel](https://forums.freertos.org/u/rtel)\
**Post date:** [January 31, 2017, 3:31pm UTC](https://forums.freertos.org/t/configtotal-heap-size-increase/6376/2 "2017-01-31T15:31:32Z")

</div>

**[rtel](https://sourceforge.net/u/rtel/)** wrote on [Tuesday, January 31, 2017](https://sourceforge.net/p/freertos/discussion/382005/thread/9b7cdec2/#8380/e983):

I’m not sure how 15.36K becomes 61.44K, but you can set  
configTOTAL\_HEAP\_SIZE to anything you like, until you run out of RAM:  
[http://www.freertos.org/a00111.html](http://www.freertos.org/a00111.html)

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [February 3, 2017, 2:30pm UTC](https://forums.freertos.org/t/configtotal-heap-size-increase/6376/3 "2017-02-03T14:30:21Z")

</div>

**[kkoovalsky](https://sourceforge.net/u/kkoovalsky/)** wrote on [Friday, February 03, 2017](https://sourceforge.net/p/freertos/discussion/382005/thread/9b7cdec2/#7e74):

So, is the calculation good: (size\_t)15,36K = 4 \* 15,36K, because size\_t on STM32 is 4B, isn’t it?

---

<div class="post-metadata">

**Author:** ![rtel](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/rtel/32/31_2.png) [@rtel](https://forums.freertos.org/u/rtel)\
**Post date:** [February 3, 2017, 3:22pm UTC](https://forums.freertos.org/t/configtotal-heap-size-increase/6376/4 "2017-02-03T15:22:45Z")

</div>

**[rtel](https://sourceforge.net/u/rtel/)** wrote on [Friday, February 03, 2017](https://sourceforge.net/p/freertos/discussion/382005/thread/9b7cdec2/#7e74/9c37):

Look where configTOTAL\_HEAP\_SIZE is used. Line 106 at the time of  
writing. It is a char array. If configTOTAL\_HEAP\_SIZE is 1000 the heap  
will be 1000 bytes:  
[https://sourceforge.net/p/freertos/code/HEAD/tree/trunk/FreeRTOS/Source/portable/MemMang/heap\_4.c](https://sourceforge.net/p/freertos/code/HEAD/tree/trunk/FreeRTOS/Source/portable/MemMang/heap_4.c)
