18 lines
384 B
C
18 lines
384 B
C
#include <stdlib.h>
|
|
#include "inc/malloc.h"
|
|
|
|
int main(void) {
|
|
int *arr = ft_malloc(42);
|
|
printf ("addr of arr is : %p\n", arr);
|
|
arr = realloc(arr, 42);
|
|
int *arr2 = ft_malloc(124);
|
|
int *arr3 = ft_malloc(1540);
|
|
printf ("addr of arr is : %p\n", arr);
|
|
printf ("addr of arr2 is : %p\n", arr2);
|
|
printf ("addr of arr3 is : %p\n", arr3);
|
|
free(arr);
|
|
show_alloc_sizes();
|
|
return 0;
|
|
}
|
|
|