Revert TLSF

This reverts commit 5dddb075ac
This commit is contained in:
MX
2024-05-16 05:12:51 +03:00
parent 97d5b8b6f6
commit 0ae78dfcdd
21 changed files with 645 additions and 629 deletions
-1
View File
@@ -13,7 +13,6 @@ env.Append(
libs = env.BuildModules(
[
"tlsf",
"mlib",
"stm32wb",
"freertos",
+4 -4
View File
@@ -466,7 +466,7 @@ static bool elf_load_section_data(ELFFile* elf, ELFSection* section, Elf32_Shdr*
return true;
}
section->data = aligned_alloc(section_header->sh_addralign, section_header->sh_size);
section->data = aligned_malloc(section_header->sh_size, section_header->sh_addralign);
section->size = section_header->sh_size;
if(section_header->sh_type == SHT_NOBITS) {
@@ -718,7 +718,7 @@ static bool elf_relocate_fast(ELFFile* elf, ELFSection* s) {
}
}
free(s->fast_rel->data);
aligned_free(s->fast_rel->data);
free(s->fast_rel);
s->fast_rel = NULL;
@@ -785,10 +785,10 @@ void elf_file_free(ELFFile* elf) {
ELFSectionDict_next(it)) {
const ELFSectionDict_itref_t* itref = ELFSectionDict_cref(it);
if(itref->value.data) {
free(itref->value.data);
aligned_free(itref->value.data);
}
if(itref->value.fast_rel) {
free(itref->value.fast_rel->data);
aligned_free(itref->value.fast_rel->data);
free(itref->value.fast_rel);
}
free((void*)itref->key);
Submodule lib/tlsf deleted from 8fc595fe22
-21
View File
@@ -1,21 +0,0 @@
Import("env")
env.Append(
CPPPATH=[
"#/lib/tlsf",
],
)
libenv = env.Clone(FW_LIB_NAME="tlsf")
libenv.ApplyLibFlags()
libenv.Append(
CPPDEFINES=[],
)
sources = [File("tlsf/tlsf.c")]
lib = libenv.StaticLibrary("${FW_LIB_NAME}", sources)
libenv.Install("${LIB_DIST_DIR}", lib)
Return("lib")