eecs280f13_FinalExam

Eecs280f13_FinalExam

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: am contains a memory leak. Write the strings that are leaked. EECS 280 Fall 2013 8/25 uniqname: _________________________ Problem 2: Dynamic Memory (20 points) Consider the stack and heap memory models from lecture. Parts a) and b) ask you to draw the stack and heap after some code executes. Cross off deleted memory blocks. Circle leaked memory blocks. Omit function call stack frames. Draw null pointers as pointing to the “little void”. a) (4 points) Draw the stack and the heap after the code for each section is finished executing. The first few lines of code are given as an example. itmi( n an){ it*a=nwit2; n e n / oefryu /dn o o a0 ; =4 / oefryu /dn o o a1 ; =2 / oefryu /dn o o dlt[ ; eee]a / oefryu /dn o o itb2 24; n ={,} nwit3; e n() it* +; n c=b1 } EECS 280 Fall 2013 9/25 uniqname: _________________________ For the rest of this question, you will be using a class similar to ArrayIntVector from Lab 10, but holding int* instead of int: Do NOT remove this page; it will be used for part c casVco ls etr{ pbi: ulc Vco(n ntaaiy etri...
View Full Document

This test prep was uploaded on 03/10/2014 for the course EECS 280 taught by Professor Noble during the Winter '08 term at University of Michigan.

Ask a homework question - tutors are online