O'Reilly logo

An Introduction to Design Patterns in C++ with Qt 4 by Paul Ezust, Alan Ezust

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

Chapter 22. Memory Access

Arrays and pointers are low-level building blocks of C programs that provide fast access to hardware memory. This chapter discusses the different ways to organize and access memory.

22.1

Pointer Pathology

504

22.2

Further Pointer Pathology with Heap Memory

506

22.3

Memory Access Summary

509

22.4

Introduction to Arrays

509

22.5

Pointer Arithmetic

510

22.6

Arrays, Functions, and Return Values

511

22.7

Different Kinds of Arrays

513

22.8

Valid Pointer Operations

513

22.9

What Happens If new Fails?

515

22.10

Chapter Summary

519

Direct manipulation of memory entails some serious risks and requires good practices and thorough testing to avoid serious errors. Improper use of pointers and dynamic memory can cause program crashes that result from heap corruption ...

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