Merge branch 'fix/add-dram-limitations-in-docs' into 'master'

docs: add section in ram-usage documentation to clarify DRAM limitations on esp32

Closes IDFGH-1187

See merge request espressif/esp-idf!21085
This commit is contained in:
Zim Kalinowski 2022-11-15 17:54:20 +08:00
commit f3a5a29bf8
2 changed files with 7 additions and 1 deletions

View File

@ -24,6 +24,10 @@ Non-constant static data (.data) and zero-initialized data (.bss) is placed by t
The available size of the internal DRAM region is reduced by 64 KB (by shifting start address to ``0x3FFC0000``) if Bluetooth stack is used. Length of this region is also reduced by 16 KB or 32 KB if trace memory is used. Due to some memory fragmentation issues caused by ROM, it is also not possible to use all available DRAM for static allocations - however the remaining DRAM is still available as heap at runtime.
.. note::
There is 520KB of available SRAM (320KB of DRAM and 200KB of IRAM) on the esp32. However, due to a technical limitation, the maximum statically allocated DRAM usage is 160KB. The remaining 160KB (for a total of 320KB of DRAM) can only be allocated at runtime as heap.
.. only:: not esp32
.. note::

View File

@ -40,6 +40,8 @@ the standard ``free()`` function.
Available Heap
--------------
.. _dram-definition:
DRAM
^^^^
@ -49,7 +51,7 @@ To find the amount of statically allocated memory, use the :ref:`idf.py size <id
.. only:: esp32
.. note:: Due to a technical limitation, the maximum statically allocated DRAM usage is 160KB. The remaining 160KB (for a total of 320KB of DRAM) can only be allocated at runtime as heap.
.. note:: See the :ref:`dram` section for more details about the DRAM usage limitations.
.. note:: At runtime, the available heap DRAM may be less than calculated at compile time, because at startup some memory is allocated from the heap before the FreeRTOS scheduler is started (including memory for the stacks of initial FreeRTOS tasks).