Click here to Skip to main content
15,797,721 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have the following code in assembly(using MARS):
li $v0,9
li $a0,40

li $v0,9
li $a0,-40

I'm getting the following error:
Runtime exception at 0x00400014: request (-40) is negative heap amount (syscall 9)

how can i free the heap
thank you

What I have tried:

I've search and all i can find is to use the negative for deallocate. but it didn't seems to work.
Updated 11-Jul-20 6:16am

1 solution

Share this answer
Member 11296776 11-Jul-20 11:27am    
this is for freeing the stack not the heap
is there a way to free the heap?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900