2022-03-05 12:43:06 -05:00
|
|
|
#include <stdio.h>
|
|
|
|
#include "sfmm.h"
|
|
|
|
|
|
|
|
int main(int argc, char const *argv[]) {
|
2022-03-25 20:50:24 -04:00
|
|
|
sf_set_magic(0x0);
|
2022-03-25 21:13:36 -04:00
|
|
|
|
|
|
|
|
|
|
|
size_t sz_u = 200, sz_v = 150, sz_w = 50, sz_x = 150, sz_y = 200, sz_z = 250;
|
|
|
|
void *u = sf_malloc(sz_u);
|
|
|
|
sf_show_heap();
|
|
|
|
/* void *v = */ sf_malloc(sz_v);
|
|
|
|
sf_show_heap();
|
|
|
|
void *w = sf_malloc(sz_w);
|
|
|
|
sf_show_heap();
|
|
|
|
/* void *x = */ sf_malloc(sz_x);
|
|
|
|
sf_show_heap();
|
2022-03-25 20:50:24 -04:00
|
|
|
|
2022-03-25 21:13:36 -04:00
|
|
|
void *y = sf_malloc(sz_y);
|
|
|
|
sf_show_heap();
|
|
|
|
/* void *z = */ sf_malloc(sz_z);
|
|
|
|
sf_show_heap();
|
|
|
|
|
|
|
|
sf_free(u);
|
|
|
|
sf_show_heap();
|
|
|
|
sf_free(w);
|
|
|
|
sf_show_heap();
|
|
|
|
sf_free(y);
|
2022-03-25 17:47:01 -04:00
|
|
|
|
2022-03-05 12:43:06 -05:00
|
|
|
return EXIT_SUCCESS;
|
|
|
|
}
|