Skip to content

Commit

Permalink
[WIP][libc] Add freelist malloc
Browse files Browse the repository at this point in the history
  • Loading branch information
PiJoules committed Jun 6, 2024
1 parent f078548 commit 519d471
Show file tree
Hide file tree
Showing 14 changed files with 1,985 additions and 18 deletions.
1 change: 1 addition & 0 deletions libc/config/baremetal/riscv/entrypoints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ set(TARGET_LIBC_ENTRYPOINTS
libc.src.stdlib.ldiv
libc.src.stdlib.llabs
libc.src.stdlib.lldiv
libc.src.stdlib.malloc
libc.src.stdlib.qsort
libc.src.stdlib.rand
libc.src.stdlib.srand
Expand Down
14 changes: 13 additions & 1 deletion libc/src/stdlib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -380,8 +380,20 @@ elseif(LIBC_TARGET_OS_IS_GPU)
aligned_alloc
)
else()
add_entrypoint_external(
add_entrypoint_object(
malloc
SRCS
freelist_malloc.cpp
HDRS
malloc.h
DEPENDS
libc.src.__support.CPP.new
libc.src.__support.CPP.optional
libc.src.__support.CPP.span
libc.src.__support.CPP.type_traits
libc.src.__support.fixedvector
libc.src.string.memcpy
libc.src.string.memset
)
add_entrypoint_external(
free
Expand Down
Loading

0 comments on commit 519d471

Please sign in to comment.