From 29b8c1556bf456596c6c067d413b65b51e17724e Mon Sep 17 00:00:00 2001 From: Thomas Vanbesien Date: Sun, 22 Feb 2026 12:31:46 +0100 Subject: Initial scaffold: Makefile, stub malloc/free/realloc, test harness Build system produces libft_malloc_$HOSTTYPE.so shared library with Libft (NOMALLOC=1) as dependency. Stub functions print their name and return NULL. Test runner compares system malloc vs LD_PRELOAD output using write(2) to avoid stdio interference. --- src/realloc.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/realloc.c (limited to 'src/realloc.c') diff --git a/src/realloc.c b/src/realloc.c new file mode 100644 index 0000000..c0bbfed --- /dev/null +++ b/src/realloc.c @@ -0,0 +1,16 @@ +/** + * @file realloc.c + * @brief Stub implementation of realloc. + */ + +#include "libft.h" +#include "malloc.h" + +void * +realloc (void *ptr, size_t size) +{ + (void)ptr; + (void)size; + ft_putendl_fd ("REALLOC", 1); + return (NULL); +} -- cgit v1.2.3