Skip to content

Commit

Permalink
Docs:add how to use multi-heap region
Browse files Browse the repository at this point in the history
When we want to use multi-heap region, we should modify two sections.
This document shows them.
  • Loading branch information
jeongchanKim committed Nov 15, 2017
1 parent 5120ee7 commit 7570113
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions docs/HowToUseMultiHeap.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# How to use(add) Multi-heap Regions

There are two cases to use multi-heap regions.
1. continuous physical RAM but want to split regions
2. separated physical RAMs but want to use for heap

Modify *[Kconfig](#Kconfig)* and *[TizenRT configuration file](#tizenrt-configuration-file)*.

## Kconfig

Add **select ARCH_HAVE_HEAPx** belong to config ARCH_ARM in os/arch/<ARCH_NAME>/src/<CHIP_NAME>/Kconfig.
```
config ARCH_CHIP_<CHIP_NAME>
select ARCH_HAVE_HEAPx
```
This will enable HEAPx_BASE and HEAPx_SIZE configs in os/mm/Kconfig.

## TizenRT configuration file

Set base addresses and sizes for new heap regions through menuconfig.
```
cd $TIZENRT_BASEDIR
cd os
make menuconfig
```
Set *CONFIG_HEAPx_BASE* and *CONFIG_HEAPx_SIZE* based on new heap region information.
```
Memory Management -> Set List of start address for additional heap region
Memory Management -> Set List of size for additional heap region
```

TizenRT will add additional heap region automatically.

0 comments on commit 7570113

Please sign in to comment.