Memory Management

Prerequisite: 101



Course Materials

IRC #gnome-university

This course will cover the basics of dynamically allocating and releasing memory as it is needed by a program. The student will learn the difference between the stack and the heap, pointers, memory ownership, allocation, and reclamation.

Students will work through the following chapters and perform the exercises. Questions may be asked of the mentor as well as the community on IRC.


These need to be organized into chapters.

  • malloc, calloc, alloca, free (possibly using g_ variants?)
  • What is a heap?
  • What is a stack?
  • Who's responsibility is it to free?
  • Basic reference counting of structures.

I think for the student project we will go through and build a boxed type (in gobject parlance) for delivering messages to a post box.

Chapter 1

Chapter 2

Chapter 3

Chapter 4

Chapter 5

Chapter 6

Chapter 7

Chapter 8

Chapter 9

Chapter 10

Outreach/GnomeUniversity/C/MemoryManagement (last edited 2013-12-04 18:14:58 by WilliamJonMcCann)