tests/
This commit is contained in:
parent
b635e5c158
commit
555d3e2cc5
1 changed files with 20 additions and 0 deletions
20
malloc/tests/main.c
Normal file
20
malloc/tests/main.c
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
#include <stdlib.h>
|
||||
#include "../includes/malloc.h"
|
||||
|
||||
int main(void)
|
||||
{
|
||||
void *ptr0 = malloc(4096);
|
||||
show_alloc_mem();
|
||||
|
||||
void *ptr1 = malloc(16);
|
||||
show_alloc_mem();
|
||||
|
||||
free(ptr0);
|
||||
show_alloc_mem();
|
||||
|
||||
void *ptr2 = malloc(16);
|
||||
show_alloc_mem();
|
||||
|
||||
void *ptr3 = malloc(32);
|
||||
show_alloc_mem();
|
||||
}
|
||||
Loading…
Reference in a new issue