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:
Abdelatif Guettouche
2021-06-18 07:14:17 -05:00
committed by Xiang Xiao
parent 79e9347551
commit af5e0c620f
36 changed files with 118 additions and 123 deletions
+2 -2
View File
@@ -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
+6 -6
View File
@@ -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)