debugging helper: heap remaining
This commit is contained in:
parent
34d3cb48e9
commit
4eda8c599c
|
@ -75,6 +75,18 @@ $allocate:end:
|
||||||
5d/pop-to-ebp
|
5d/pop-to-ebp
|
||||||
c3/return
|
c3/return
|
||||||
|
|
||||||
|
heap-bound: # -> _/eax: int
|
||||||
|
# . prologue
|
||||||
|
55/push-ebp
|
||||||
|
89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp
|
||||||
|
#
|
||||||
|
8b/copy 0/mod/indirect 5/rm32/.disp32 . . 0/r32/eax Heap/disp32 . # copy *Heap to eax
|
||||||
|
$heap-bound:end:
|
||||||
|
# . epilogue
|
||||||
|
89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp
|
||||||
|
5d/pop-to-ebp
|
||||||
|
c3/return
|
||||||
|
|
||||||
# Claim the next 'n' bytes of memory starting at ad->curr and update ad->curr.
|
# Claim the next 'n' bytes of memory starting at ad->curr and update ad->curr.
|
||||||
# Abort if there isn't enough memory in 'ad'.
|
# Abort if there isn't enough memory in 'ad'.
|
||||||
allocate-raw: # ad: (addr allocation-descriptor), n: int, out: (addr handle _)
|
allocate-raw: # ad: (addr allocation-descriptor), n: int, out: (addr handle _)
|
||||||
|
|
1
400.mu
1
400.mu
|
@ -38,6 +38,7 @@ sig turn-on-debug-print
|
||||||
sig turn-off-debug-print
|
sig turn-off-debug-print
|
||||||
sig abort e: (addr array byte)
|
sig abort e: (addr array byte)
|
||||||
sig dump-call-stack
|
sig dump-call-stack
|
||||||
|
sig heap-bound -> _/eax: int
|
||||||
|
|
||||||
sig count-event
|
sig count-event
|
||||||
sig count-of-events -> _/eax: int
|
sig count-of-events -> _/eax: int
|
||||||
|
|
Loading…
Reference in New Issue