From 9f4891f95070c66ea9f1aba99d72724d4ab24e5a Mon Sep 17 00:00:00 2001 From: "John Wilbert M. Villamor" Date: Sat, 19 Sep 2020 20:43:05 +0800 Subject: Revised makefiles, added strtok(), command line arguments, SetHeapSize(), moved ISR and callback system to psxetc, moved debug font to psxgpu, fixed CD-ROM library crashing on PSIO, fixed interrupt callback setup to fix crashing on ResetGraph() --- libpsn00b/libc/malloc.s | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'libpsn00b/libc/malloc.s') diff --git a/libpsn00b/libc/malloc.s b/libpsn00b/libc/malloc.s index fdb196d..90f9bd4 100644 --- a/libpsn00b/libc/malloc.s +++ b/libpsn00b/libc/malloc.s @@ -38,6 +38,17 @@ InitHeap: jr $ra sw $0 , ND_SIZE($a0) + +# Changes the heap size without clearing or relocating the heap +# a0 - Size of memory heap in bytes +.global SetHeapSize +.type SetHeapSize, @function +SetHeapSize: + la $v1, _malloc_size + lw $v0, 0($v1) + jr $ra + sw $a1, 0($v1) + # Allocates a block of memory in the heap # a0 - Size of memory block to allocate. -- cgit v1.2.3