O'Reilly logo

C Programming Absolute Beginner’s Guide, Third Edition by Dean Miller, Greg Perry

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

26. Maximizing Your Computer’s Memory

In This Chapter

Thinking of the heap

Understanding why you need the heap

Allocating the heap

Taking action if there’s not enough heap memory

Freeing heap memory

Handling multiple allocations

Absolute beginners to C aren’t the only ones who might find this chapter’s concepts confusing at first. Even advanced C programmers get mixed up when dealing with the heap. The heap is the collection of unused memory in your computer. The memory left over—after your program, your program’s variables, and your operating system’s workspace—comprises your computer’s available heap space, as Figure 26.1 shows.

FIGURE 26.1 The heap is unused memory.

Many times you’ll want access to the heap, because your program ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required