



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




Dr. Rahul Singh
May 19, 2009 Lecture 14: Memory Management Electrical and Computer Engineering University of California, Santa Barbara
Electrical and Computer Engineering University of California, Santa Barbara
Lecture 14: Memory Management I May 19, 2009
Electrical and Computer Engineering University of California, Santa Barbara
Electrical and Computer Engineering University of California, Santa Barbara
Electrical and Computer Engineering University of California, Santa Barbara The Heap (Dynamic memory)
int *ptr; ptr = (int ) malloc(4); / malloc returns type (void *), so need to cast to right type */
Lecture 14: Memory Management I May 19, 2009
Electrical and Computer Engineering University of California, Santa Barbara
Lecture 14: Memory Management I May 19, 2009 Electrical and Computer Engineering University of California, Santa Barbara Choosing a block in malloc()
Electrical and Computer Engineering University of California, Santa Barbara Tradeoffs of allocation policies