fix tests (error in a printf)
This commit is contained in:
8
tests.c
8
tests.c
@ -6,7 +6,7 @@
|
|||||||
/* By: tomoron <tomoron@student.42angouleme.fr> +#+ +:+ +#+ */
|
/* By: tomoron <tomoron@student.42angouleme.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2025/03/20 17:58:16 by tomoron #+# #+# */
|
/* Created: 2025/03/20 17:58:16 by tomoron #+# #+# */
|
||||||
/* Updated: 2025/03/21 13:13:33 by tomoron ### ########.fr */
|
/* Updated: 2025/03/21 13:35:34 by tomoron ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
@ -20,11 +20,11 @@ void malloc_free_test()
|
|||||||
|
|
||||||
printf("MALLOC TEST (pointers shouldn't be null):\n");
|
printf("MALLOC TEST (pointers shouldn't be null):\n");
|
||||||
ptr[0] = malloc(42);
|
ptr[0] = malloc(42);
|
||||||
printf("tiny malloc : %p\n", ptr);
|
printf("tiny malloc : %p\n", ptr[0]);
|
||||||
ptr[1] = malloc(1024);
|
ptr[1] = malloc(1024);
|
||||||
printf("small malloc : %p\n", ptr);
|
printf("small malloc : %p\n", ptr[1]);
|
||||||
ptr[2] = malloc(16384 * 1024);
|
ptr[2] = malloc(16384 * 1024);
|
||||||
printf("large malloc : %p\n", ptr);
|
printf("large malloc : %p\n", ptr[2]);
|
||||||
|
|
||||||
printf("\n\n\nFREE TEST (1024 bloc is from printf):\n");
|
printf("\n\n\nFREE TEST (1024 bloc is from printf):\n");
|
||||||
printf("before : \n");
|
printf("before : \n");
|
||||||
|
Reference in New Issue
Block a user