flâneur — a map of the web's best reading

CS107E Assignment 4: Stack and Heap

cs107e.github.io · 5,927 words · saved by 1 readers

For this week's assignment, you continue in the role of library implementer to add a stack debugging aid (backtrace.c) and a heap allocator (malloc.c) to your growing collection of foundational routines. Global and local variables have been sufficient for our needs thus far, but more complex applications will require support for dynamic allocation. Heap allocation offers the programmer explicit and direct control over sizing and lifetime of storage. With this power comes the responsibility to properly allocate and deallocate that memory. Using dynamic memory correctly and safely is a challenge for the client; implementing a heap allocator correctly and efficiently is a challenge for the implementer. After you finish this assignment, you will: Each new assignment also provides opportunity to appreciate and benefit from your hard work in previous weeks. You will delight in the ease of testing and debugging now that you have added printf to your bag of tools. By the end of the quarter, al

CS107E Assignment 4: Stack and Heap Assignment 4: Stack and Heap Assignment written by Julie Zelenski Due: Tuesday, May 05 at 5:00 pm Goals For this week's assignment, you continue in the role of library implementer to add a stack debugging aid ( backtrace.c ) and a heap allocator ( malloc.c ) to your growing collection of foundational routines. Global and local variables have been sufficient for our needs thus far, but more complex applications will require support for dynamic allocation. Heap allocation offers the programmer explicit and direct control over sizing and lifetime of storage. Wi

Explore this link on the map →

saved by

related reading