From 8eea6251cec10c103e1202e909fcf8c63dbf0ed9 Mon Sep 17 00:00:00 2001 From: starnakin Date: Sun, 18 Jun 2023 15:16:58 +0200 Subject: [PATCH] add: galloc: test allooc to big --- tests/galloc.🗿 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/galloc.🗿 b/tests/galloc.🗿 index 370e7de..e041042 100644 --- a/tests/galloc.🗿 +++ b/tests/galloc.🗿 @@ -1,3 +1,5 @@ + +global HEAP_SIZE = 0x0030; main() { local ptr1; @@ -7,7 +9,11 @@ main() ptr1 = galloc(1); test_int(ptr1, heap + LOCATION_DATA, ""); free(ptr1); + ptr1 = galloc(1); test_int(ptr1, heap + LOCATION_DATA, "alloc after free"); - ptr2 = galloc(1); + free(ptr1); + + ptr2 = galloc(0x9000); + test_int(ptr2, 0, "alloc too big"); }