O'Reilly logo

Hands-On System Programming with Linux by Kaiwan N Billimoria

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

Data segments

Immediately above the text segment is the data segment, which is the place where the process holds the program's global and static variables (data).

Actually, it's not one mapping (segment); the data segment consists of three distinct mappings. In order from the low address, it consists of: the initialized data segment, the uninitialized data segment, and the heap segment.

We understand that, in a C program, uninitialized global and static variables are automatically initialized to zero. What about initialized globals? The initialized data segment is the region of address space where explicitly initialized global and static variables are stored.

The uninitialized data segment is the region of address space where, of course, ...

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