diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-08-23 16:35:52 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-08-23 16:37:16 -0600 |
commit | 4fe901851582cf8b7745497231695cfff60e53df (patch) | |
tree | 16cffb0c9e598d4c7168bf28c34b422a0b5dbee5 /nuttx/mm/Kconfig | |
parent | 7fbe288b3e1fda8640dd9e770b3faa3cd03853b1 (diff) | |
download | px4-nuttx-4fe901851582cf8b7745497231695cfff60e53df.tar.gz px4-nuttx-4fe901851582cf8b7745497231695cfff60e53df.tar.bz2 px4-nuttx-4fe901851582cf8b7745497231695cfff60e53df.zip |
include/nuttx/pgalloc.h and mm/mm_pgalloc.c: Add a simple page allocator based on the existing NuttX granule allocator. I am not certain if the granule allocator is sufficiently deterministic for long range use, but it gets get a page allocator in place for testing very quickly.
Diffstat (limited to 'nuttx/mm/Kconfig')
-rw-r--r-- | nuttx/mm/Kconfig | 45 |
1 files changed, 43 insertions, 2 deletions
diff --git a/nuttx/mm/Kconfig b/nuttx/mm/Kconfig index 26f7125e4..0f7d56102 100644 --- a/nuttx/mm/Kconfig +++ b/nuttx/mm/Kconfig @@ -101,7 +101,7 @@ config GRAN bool "Enable Granule Allocator" default n ---help--- - Enable granual allocator support. Allocations will be aligned to the + Enable granule allocator support. Allocations will be aligned to the granule size; allocations will be in units of the granule size. Larger granules will give better performance and less overhead but more losses of memory due to alignment and quantization waste. @@ -136,5 +136,46 @@ config DEBUG_GRAN default n depends on GRAN && DEBUG ---help--- - Just like DEBUG_MM, but only generates ouput from the gran + Just like DEBUG_MM, but only generates output from the gran allocation logic. + +config MM_PGALLOC + bool "Enable Page Allocator" + default n + depends on ARCH_HAVE_MMU + select GRAN + ---help--- + Enable support for a MMU physical page allocator based on the + granule allocator. + +if MM_PGALLOC + +config MM_PGSIZE + int "Page Size" + default 4096 + --help--- + The MMU page size. Must be one of {1024, 2048, 4096, 8192, or + 16384}. This is easily extensible, but only those values are + currently support. + +config MM_PGPOOL_PADDR + hex "Page Memory Pool Start" + ---help--- + Physical address of the start of the page memory pool. This + will be aligned to the page size if it is not already aligned. + +config MM_PGPOOL_SIZE + int "Page Memory Pool Size" + ---help--- + The size of the page memory pool in bytes. This will be aligned + if it is not already aligned. + +config DEBUG_PGALLOC + bool "Page Allocator Debug" + default n + depends on DEBUG + ---help--- + Just like DEBUG_MM, but only generates output from the page + allocation logic. + +endif # MM_PGALLOC |