blob: 877d39ea7f85b41d5bd1658503cb0cc3f98b8b6f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
/**
* @file test_show.c
* @brief Test show_alloc_mem — links directly against libft_malloc.
*/
#include "malloc.h"
int
main (void)
{
/* One allocation per category: TINY, TINY, SMALL, LARGE. */
void *a = malloc (42);
void *b = malloc (100);
void *c = malloc (500);
void *d = malloc (2000);
(void)a;
(void)b;
(void)c;
(void)d;
show_alloc_mem ();
free (a);
free (b);
free (c);
free (d);
return (0);
}
|