Log In
Or create an account ->
Imperial Library
Home
About
News
Upload
Forum
Help
Login/SignUp
Index
Cover
Title
Copyright
Dedication
Contents at a Glance
Contents
About the Authors
Acknowledgments
Introduction
Chapter 1: Memory, Runtime Memory Organization, and Virtual Memory
Memory and Classification
Classification
Memory Layout
Data and Instruction
How the Processor Accesses Main Memory
Cache Memory
Compilation Process Chain
Preprocessing
Compilation
Assembler
Linking
Loader
Memory Models
Real Address Mode Memory Model
Address Translation in Real Mode
Flat Memory Model
Segmented Memory Model
Memory Layout Using Segments
Segmentation
Code Segment
Data Segment
Uninitialized/BSS Segment
Stack Segment
Heap Segment
Runtime Memory Organization
Intricacies of a Function Call
Steps to Make a Function Call
Memory Segments
Virtual Memory Organization
A Glimpse into a Virtual Memory System
Paging
Page Table
Summary
Chapter 2: Pointer Basics
What is an address of a variable?
Address of Operator
Retrieving the Address of a Variable
Pointer Declaration
Pointer Assignment
Size of Pointer Variables
Pointer Dereferencing
Basic Usage of Pointer
Pass by Value
Pass by Reference
Pointers and Constants
Constant Pointer Variable
Pointer to Constant Variable
Constant Pointer to a Constant Variable
Multilevel Pointers
Pointer to a Pointer Variable
Understanding a Cryptic Pointer Expression
Referencing
Dereferencing
Referencing
Dereferencing
Summary
Chapter 3: Pointer Arithmetic and Single Dimension Arrays
Array Memory Layout
Endianness
Pointer Arithmetic
Pointer Addition
Pointer Subtraction
Arrays Explored
Dynamic Array
Array of Pointers
Pointer to Array
Summary
Chapter 4: Pointers and Strings
String Layout in Memory
Accessing String Elements
Dynamic Memory Allocation
String Literals and Constants
String Operations
Handling String Inputs
String Iteration
String Copy
String Concatenation
Array of Strings
Declaration of Array of Strings
Summary
Chapter 5: Pointers and Multidimensional Arrays
Array Layout
Pointer to 2D Array
3D Array Layout
Summary
Chapter 6: Pointers to Structures
Defining Structures
Declaring Structure Variables
Accessing Structure Members
Initializing Structure Variables
Method 1
Method 2
Structure Nesting
Structure in Memory
Structure Padding
Data Alignment
Structure Padding
When Structure Padding is not Helpful
Structure Packing
Structure Assignment and Copying
Structure Pointers
Accessing Member Variables
Passing Structure Pointer Variable
Common Mistakes
Type Casting Structure Pointers
Self-Referential Structures
Data Structures and Algorithms
Linked Lists
Binary Search Tree
Iterating Over the Nodes
Summary
Chapter 7: Function Pointers
Defining Function Pointers
Initializing Function Pointers
Using Function Pointers
Assembly Details of Function Pointer Calls
Invocation of Function Call Directly
Invocation of Function Call Indirectly with a Function Pointer
Array of Function Pointers
Defining an Array of a Function Pointers
Returning Function Pointers from Function
Difficult Way
Easy Way
Function Pointer Usage in the Linux Kernel
Summary of Cryptic Function Pointer Declarations
Summary
Chapter 8: Pointers to File I/O
The Physical Layout of Secondary Memory
Surface View
Interfacing HDD with CPU
Disk Addressing Schemes
Introduction to File System Architecture
Logical File System
The Basic File System
What Is Required to Make a File System?
On-Disk Data Structures
In-Memory Data Structures
Accessing Files
FILE Data Structure
First Task
Second Task
Reading from a File
Reading a Single Character
Reading Strings from a File
Reading Blocks from File
Formatted Reading from File
Writing to a File
Writing a Single Character to a File
Writing a String onto the File
Writing a Block of Data to a File
Accessing Disk at Random Locations
Seeking the File Indicator
Miscellaneous Functions
Knowing the Size of File
Another Way of Resetting the Position of File
Summary
Index
← Prev
Back
Next →
← Prev
Back
Next →