fix alloc between two allocations, fix free (uninitialized value)

This commit is contained in:
2024-12-01 19:22:43 +01:00
parent 7cddc28d28
commit a15705401e
3 changed files with 20 additions and 5 deletions

9
main.c
View File

@ -1,10 +1,17 @@
#include "srcs/includes/malloc.h"
#include <stdio.h>
int main(void)
{
void *ptr;
ptr = ft_malloc(1013);
ft_malloc(1013);
printf("%p\n",ft_malloc(100));
ft_malloc(100);
ptr = ft_malloc(1000);
ft_malloc(100);
ft_malloc(100);
ft_free(ptr);
ft_malloc(123);
show_alloc_mem();
}