mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 16:50:55 +08:00
modlib: Always use separate allocation for text and data
Pros: * Reduce code differences * Smaller allocations for !CONFIG_ARCH_USE_MODULE_TEXT Cons: * Likely to use more memory for !CONFIG_ARCH_USE_MODULE_TEXT in total Tested with: * sim:module on macOS * esp32-devkit:nsh + CONFIG_MODULE on qemu * lm3s6965-ek:qemu-protected + CONFIG_EXAMPLES_SOTEST on qemu
This commit is contained in:
committed by
Xiang Xiao
parent
1a9e7efde5
commit
418e11b8b3
@@ -159,12 +159,8 @@ struct module_s
|
||||
mod_initializer_t initializer; /* Module initializer function */
|
||||
#endif
|
||||
struct mod_info_s modinfo; /* Module information */
|
||||
#if defined(CONFIG_ARCH_USE_MODULE_TEXT)
|
||||
FAR void *textalloc; /* Allocated kernel text memory */
|
||||
FAR void *dataalloc; /* Allocated kernel memory */
|
||||
#else
|
||||
FAR void *alloc; /* Allocated kernel memory */
|
||||
#endif
|
||||
#if defined(CONFIG_FS_PROCFS) && !defined(CONFIG_FS_PROCFS_EXCLUDE_MODULE)
|
||||
size_t textsize; /* Size of the kernel .text memory allocation */
|
||||
size_t datasize; /* Size of the kernel .bss/.data memory allocation */
|
||||
|
||||
Reference in New Issue
Block a user