mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 16:50:55 +08:00
riscv: Implement page-fault exception and on-demand paging
When an application is being loaded `up_addrenv_create ` calls `create_region` to create the address environment. Only the first entry is mapped when the region is created. Virtual memory that is not mapped will trigger an exception when accessed. Other memory pages are allocated and mapped on-demand. This enables setting larger heap and stack for the process without compromising the overall system memory.
This commit is contained in:
committed by
Xiang Xiao
parent
ae9ef972c0
commit
c67502d9b4
@@ -903,6 +903,16 @@ config ARCH_PGPOOL_SIZE
|
||||
endif # ARCH_PGPOOL_MAPPING
|
||||
endif # ARCH_ADDRENV && ARCH_NEED_ADDRENV_MAPPING
|
||||
|
||||
config PAGING
|
||||
bool "On-demand paging"
|
||||
default n
|
||||
depends on BUILD_KERNEL && ARCH_USE_MMU && !ARCH_ROMPGTABLE && !LEGACY_PAGING
|
||||
---help---
|
||||
If set =y in your configation file, this setting will enable on-demand
|
||||
paging, which relies on a MMU to enable larger virtual memory spaces
|
||||
and map it to physical memory on-demand (usually during a page-fault
|
||||
exception).
|
||||
|
||||
menuconfig LEGACY_PAGING
|
||||
bool "Legacy On-demand paging"
|
||||
default n
|
||||
|
||||
Reference in New Issue
Block a user