Kconfig 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. #
  2. # For a description of the syntax of this configuration file,
  3. # see the file kconfig-language.txt in the NuttX tools repository.
  4. #
  5. choice
  6. prompt "Build heap manager"
  7. default MM_DEFAULT_MANAGER
  8. config MM_DEFAULT_MANAGER
  9. bool "Default heap manager"
  10. ---help---
  11. NuttX original memory manager strategy.
  12. config MM_CUSTOMIZE_MANAGER
  13. bool "Customized heap manager"
  14. ---help---
  15. Customized memory manger policy. The build will fail
  16. if the MM heap module not defined by customer.
  17. endchoice
  18. config MM_KERNEL_HEAP
  19. bool "Support a protected, kernel heap"
  20. default y
  21. depends on !BUILD_FLAT
  22. ---help---
  23. Partition heap memory into two parts: (1) a protected, kernel-mode
  24. heap accessible only by the NuttX kernel, and (2) an unprotected
  25. user-mode heap for use by applications. If you are only interested
  26. in protected the kernel from read access, then this option is not
  27. necessary. If you wish to secure the kernel data as well, then
  28. this option should be selected.
  29. The kernel heap size that is used is provided a a platform-specific
  30. up_allocate_kheap() interface. This configuration setting is made
  31. available to that platform specific code. However, the
  32. up_allocate_kheap() interface may chose to ignore this setting if it
  33. has a more appropriate heap allocation strategy.
  34. config MM_KERNEL_HEAPSIZE
  35. int "Kernel heap size"
  36. default 8192
  37. depends on MM_KERNEL_HEAP
  38. ---help---
  39. This is the size of the a protected, kernel-mode heap (in bytes).
  40. The remaining of available memory is given to the unprotected
  41. user-mode heap. This value may need to be aligned to units of the
  42. size of the smallest memory protection region.
  43. config MM_SMALL
  44. bool "Small memory model"
  45. default n
  46. ---help---
  47. Each memory allocation has a small allocation overhead. The size
  48. of that overhead is normally determined by the "width" of the
  49. address support by the MCU. MCUs that support 16-bit addressability
  50. have smaller overhead than devices that support 32-bit addressability.
  51. However, there are many MCUs that support 32-bit addressability *but*
  52. have internal SRAM of size less than or equal to 64Kb. In this case,
  53. MM_SMALL can be defined so that those MCUs will also benefit
  54. from the smaller, 16-bit-based allocation overhead.
  55. WARNING: This selection will also change the alignment of allocated
  56. memory. For example, on ARM memory will have 8-byte alignment by
  57. default. If MM_SMALL is selected, then allocated memory will have
  58. only 4-byte alignment. This may be important on some platforms where
  59. 64-bit data is in allocated structures and 8-byte alignment is required.
  60. config MM_REGIONS
  61. int "Number of memory regions"
  62. default 1
  63. ---help---
  64. If the architecture includes multiple, non-contiguous regions of
  65. memory to allocate from, this specifies the number of memory regions
  66. that the memory manager must handle and enables the API
  67. mm_addregion(heap, start, end);
  68. config ARCH_HAVE_HEAP2
  69. bool
  70. default n
  71. if ARCH_HAVE_HEAP2
  72. config HEAP2_BASE
  73. hex "Start address of second user heap region"
  74. default 0x00000000
  75. ---help---
  76. The base address of the second heap region.
  77. config HEAP2_SIZE
  78. int "Size of the second user heap region"
  79. default 0
  80. ---help---
  81. The size of the second heap region.
  82. endif # ARCH_HAVE_HEAP2
  83. config GRAN
  84. bool "Enable Granule Allocator"
  85. default n
  86. ---help---
  87. Enable granule allocator support. Allocations will be aligned to the
  88. granule size; allocations will be in units of the granule size.
  89. Larger granules will give better performance and less overhead but
  90. more losses of memory due to alignment and quantization waste.
  91. NOTE: The current implementation also restricts the maximum
  92. allocation size to 32 granules. That restriction could be
  93. eliminated with some additional coding effort.
  94. config GRAN_INTR
  95. bool "Interrupt level support"
  96. default n
  97. depends on GRAN
  98. ---help---
  99. Normally mutual exclusive access to granule allocator data is assured
  100. using a semaphore. If this option is set then, instead, mutual
  101. exclusion logic will disable interrupts. While this options is more
  102. invasive to system performance, it will also support use of the granule
  103. allocator from interrupt level logic.
  104. config DEBUG_GRAN
  105. bool "Granule Allocator Debug"
  106. default n
  107. depends on GRAN && DEBUG_FEATURES
  108. ---help---
  109. Just like DEBUG_MM, but only generates output from the gran
  110. allocation logic.
  111. config MM_PGALLOC
  112. bool "Enable Page Allocator"
  113. default n
  114. depends on ARCH_USE_MMU
  115. select GRAN
  116. ---help---
  117. Enable support for a MMU physical page allocator based on the
  118. granule allocator.
  119. if MM_PGALLOC
  120. config MM_PGSIZE
  121. int "Page Size"
  122. default 4096
  123. ---help---
  124. The MMU page size. Must be one of {1024, 2048, 4096, 8192, or
  125. 16384}. This is easily extensible, but only those values are
  126. currently support.
  127. config DEBUG_PGALLOC
  128. bool "Page Allocator Debug"
  129. default n
  130. depends on DEBUG_FEATURES
  131. ---help---
  132. Just like DEBUG_MM, but only generates output from the page
  133. allocation logic.
  134. endif # MM_PGALLOC
  135. config MM_SHM
  136. bool "Shared memory support"
  137. default n
  138. depends on MM_PGALLOC && BUILD_KERNEL && EXPERIMENTAL
  139. ---help---
  140. Build in support for the shared memory interfaces shmget(), shmat(),
  141. shmctl(), and shmdt().
  142. config MM_FILL_ALLOCATIONS
  143. bool "Fill allocations with debug value"
  144. default n
  145. ---help---
  146. Fill all malloc() allocations with 0xAA. This helps
  147. detecting uninitialized variable errors.
  148. config MM_CIRCBUF
  149. bool "Circular buffer support"
  150. default n
  151. ---help---
  152. Build in support for the circular buffer management.
  153. source "mm/iob/Kconfig"