mirror of
https://github.com/apache/nuttx.git
synced 2026-09-28 03:09:13 +08:00
Rename MODULE_TEXT to TEXT_HEAP as the latter is more generic.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
This commit is contained in:
committed by
Xiang Xiao
parent
79e9347551
commit
af5e0c620f
@@ -166,8 +166,8 @@ int unload_module(FAR struct binary_s *binp)
|
||||
if (binp->alloc[i])
|
||||
{
|
||||
binfo("Freeing alloc[%d]: %p\n", i, binp->alloc[i]);
|
||||
#if defined(CONFIG_ARCH_USE_MODULE_TEXT)
|
||||
up_module_text_free((FAR void *)binp->alloc[i]);
|
||||
#if defined(CONFIG_ARCH_USE_TEXT_HEAP)
|
||||
up_textheap_free((FAR void *)binp->alloc[i]);
|
||||
#else
|
||||
kumm_free((FAR void *)binp->alloc[i]);
|
||||
#endif
|
||||
|
||||
@@ -117,10 +117,10 @@ int elf_addrenv_alloc(FAR struct elf_loadinfo_s *loadinfo, size_t textsize,
|
||||
#else
|
||||
/* Allocate memory to hold the ELF image */
|
||||
|
||||
#if defined(CONFIG_ARCH_USE_MODULE_TEXT)
|
||||
#if defined(CONFIG_ARCH_USE_TEXT_HEAP)
|
||||
loadinfo->textalloc = (uintptr_t)
|
||||
up_module_text_memalign(loadinfo->textalign,
|
||||
textsize);
|
||||
up_textheap_memalign(loadinfo->textalign,
|
||||
textsize);
|
||||
#else
|
||||
loadinfo->textalloc = (uintptr_t)kumm_malloc(textsize + datasize);
|
||||
#endif
|
||||
@@ -130,7 +130,7 @@ int elf_addrenv_alloc(FAR struct elf_loadinfo_s *loadinfo, size_t textsize,
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
#if defined(CONFIG_ARCH_USE_MODULE_TEXT)
|
||||
#if defined(CONFIG_ARCH_USE_TEXT_HEAP)
|
||||
loadinfo->dataalloc = (uintptr_t)kumm_malloc(datasize);
|
||||
|
||||
if (0 != datasize && !loadinfo->dataalloc)
|
||||
@@ -177,10 +177,10 @@ void elf_addrenv_free(FAR struct elf_loadinfo_s *loadinfo)
|
||||
}
|
||||
#else
|
||||
|
||||
#if defined(CONFIG_ARCH_USE_MODULE_TEXT)
|
||||
#if defined(CONFIG_ARCH_USE_TEXT_HEAP)
|
||||
if (loadinfo->textalloc != 0)
|
||||
{
|
||||
up_module_text_free((FAR void *)loadinfo->textalloc);
|
||||
up_textheap_free((FAR void *)loadinfo->textalloc);
|
||||
}
|
||||
|
||||
if (loadinfo->dataalloc != 0)
|
||||
|
||||
Reference in New Issue
Block a user