vppinfra: Provide FreeBSD implementation of clib_mem functions

Working from the implementation in linux/mem.c add FreeBSD specific
functionality. This duplicates parts of the Linux implementation and a
depuplication job could be run in the future.

Stub out some parts of the API for now, they are either use unavailable
features on FreeBSD or require further implementation than this initial
implementation.

Type: improvement
Change-Id: I1e443e32304d19776a9a4d5e34adfa16ec919427
Signed-off-by: Tom Jones <thj@freebsd.org>
This commit is contained in:
Tom Jones
2024-01-26 17:04:23 +00:00
committed by Damjan Marion
parent 2cbbbb6d15
commit e12f69f773
2 changed files with 476 additions and 0 deletions

View File

@@ -222,6 +222,11 @@ if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
perfmon/bundle_core_power.c
perfmon/perfmon.c
)
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "FreeBSD")
list(APPEND VPPINFRA_SRCS
elf_clib.c
freebsd/mem.c
)
endif()
option(VPP_USE_EXTERNAL_LIBEXECINFO "Use external libexecinfo (useful for non-glibc targets)." OFF)

471
src/vppinfra/freebsd/mem.c Normal file
View File

File diff suppressed because it is too large Load Diff