fix alloc between two allocations, fix free (uninitialized value)
This commit is contained in:
9
main.c
9
main.c
@ -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();
|
||||
}
|
||||
|
Reference in New Issue
Block a user