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

li $v0,9
li $a0,-40
syscall


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.
Posted
Updated 11-Jul-20 5:16am

1 solution

 
Share this answer
 
Comments
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