| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
- test_preload.c: @file main.c -> @file test_preload.c
- show_alloc_mem.c, test_preload.c: hex array -> static const
- show_alloc_mem.c, test_preload.c, test_random.c: use size_t
for sizeof-derived indices instead of casting to int
|
| |
|
|
|
|
| |
realloc returns the same pointer if the chunk is large enough,
otherwise malloc + memcpy + free. The random test now verifies
data integrity after resizing across all three categories.
|
| |
|
|
|
|
| |
free now locates the chunk matching the pointer, marks it as
free for TINY/SMALL zones, and munmaps LARGE allocations.
Document why ASan is incompatible and list alternatives.
|
| |
|
|
|
|
| |
malloc now searches zones for a free chunk, splits it to the
requested aligned size, and allocates a new zone when none have
space. Replace getpagesize() with sysconf(_SC_PAGESIZE).
|
| |
|
|
|
|
| |
Implement show_alloc_mem() to print all zones and allocations
by ascending address. Add test_show binary that links directly
against libft_malloc.so to exercise it.
|
| |
|
|
|
|
| |
Implement mmap-based zone allocation for TINY (<=128B) and SMALL
(<=1024B) categories. malloc now creates zones on demand and
returns a pointer to the first chunk.
|
|
|
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.
|