add: free

This commit is contained in:
2023-06-18 11:11:23 +02:00
parent cea014d97b
commit 60ca301082
3 changed files with 41 additions and 18 deletions

View File

@ -1,10 +1,13 @@
main()
{
local ptr1;
local ptr2;
name = "galloc";
dbg galloc(1);
dbg galloc(1);
dbg galloc(1);
dbg galloc(1);
dbg galloc(1);
ptr1 = galloc(1);
test_str(ptr1, heap + LOCATION_DATA, "");
free(ptr1);
ptr1 = galloc(1);
test_str(ptr1, heap + LOCATION_DATA, "alloc after free");
ptr2 = galloc(1);
}