This preview shows pages 1–3. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: lw $a0, 0($sp) jal print # Use the heap Addi $t0, $0, 75 Addi $t1, $0, -75 Addi $a0, $0, 8 # Reserve 8 bytes Addi $v0, $0, 9 Syscall # v0 points at and 8B block Add $s5, $0, $v0 Sw $t0, 0($v0) Sw $t1, 4($v0) Lw $a0, 0($s5) Jal print Lw $a0, 4($s5) Jal print # Use .data Addi $t0, $0, 85 Sw $t0, num($0) Lw $a0, num($0) Jal print add $ra, $0, $s0 Jr $ra # Method for printing print: Addi $v0, $0, 1 Syscall Addi $a0, $0, 10 Addi $v0, $0, 11 syscall Jr $ra Leaking means you allocate memory location but never de-allocated it....
View Full Document
This note was uploaded on 01/26/2011 for the course CSE 2021 taught by Professor Asif during the Winter '10 term at York University.
- Winter '10