𝔖 Scriptorium
✦   LIBER   ✦

📁

Pointers in C Programming: A Modern Approach to Memory Management, Recursive Data Structures, Strings, and Arrays

✍ Scribed by Thomas Mailund


Publisher
Apress
Year
2021
Tongue
English
Leaves
539
Category
Library

⬇  Acquire This Volume

No coin nor oath required. For personal study only.

✦ Table of Contents


Table of Contents
About the Author
About the Technical Reviewer
Acknowledgments
Chapter 1: Introduction
Chapter 2: Memory, Objects, and Addresses
The Memory of a Generic Process
Objects, Sizes, and Addresses
Memory Allocation
Alignment
Call Stacks and the Lifetime of Local Variables
Chapter 3: Pointers
Call by Reference
NULL Pointers
Const and Pointers
Restricted Pointers
Chapter 4: Pointers and Types
Pointers, Types, and Data Interpretation
Casting Between Pointers of Different Types
Void Pointers
Qualified Types
Unions
Struct Pointers
Character Pointers
Arbitrary Types
Void Pointers
Chapter 5: Arrays
Arrays, Indices, and Pointer Arithmetic
Out-of-Bounds Errors
Pointers to Arrays
Arrays and Function Arguments
Multidimensional Arrays
Chapter 6: Working with Arrays
Sieve of Eratosthenes
Array Solution
Pointer Solution
Radix Sorting
Generic Functions on Arrays
Chapter 7: Strings
Strings as Sequences of Bytes
Integers to Strings
Run-Length Encoding
Finding Words
Compacting Words
Buffer Overflow Errors
Chapter 8: Substrings Through Ranges
Basic Operations
Revisiting Word Iterators
Replacing Strings
Chapter 9: Dynamic Memory Management
Functions for Dynamic Memory Allocation
malloc()
calloc()
realloc()
aligned_alloc()
free()
String Operations
Dynamic Arrays
Gapped Buffers
Chapter 10: Generic Dynamic Arrays
Void Pointers
Generic Memory Buffer
Code Generating Macros
Inlining Macros
Heap-Allocated Inlined Array
Chapter 11: Linked Lists
Singly Linked Lists
Adding a Level of Indirection
Adding a Dummy Element
Doubly Linked Lists
Link Operations
List Operations
Sorting Doubly Linked Lists
Selection Sort
Insertion Sort
Merge Sort
Quicksort
Chapter 12: Search Trees
Tree Operations
Contains
Insert
Delete
Free
Recursive Data Structures and Recursive Functions
Direct Implementation
Pass by Reference
Refactoring
Iterative Functions
Explicit Stacks
Morris Traversal
Freeing Nodes Without Recursion and Memory Allocation
Adding a Parent Pointer
Chapter 13: Function Pointers
Function Pointers for High-Order Functions
Callbacks
Generic String Iterator
Function Pointers for Abstract Data Structures
Function Pointers for Polymorphic Data Structures
Single Inheritance Objects and Classes
A Hierarchy of Expression Classes
Generating Functions
Tagged Pointers
Chapter 14: Generic Lists and Trees
Generic Lists
Casting to Links
Using Offsets
Generic Search Trees
Chapter 15: Reference Counting Garbage Collection
Immutable Links with Reference Counting
Adding a Compiler Extension (Not Portable!)
A Generic Reference Counter
Search Trees with Reference Counting
Circular Structures?
Chapter 16: Allocation Pools
A Simple Pool for Tree Nodes
Adding Resizing
Adding Deallocation
A Generic Pool
Chapter 17: Conclusions
Index


📜 SIMILAR VOLUMES


Pointers in C Programming: A Modern Appr
✍ Thomas Mailund 📂 Library 📅 2021 🏛 Apress 🌐 English

<p></p><p>Gain a better understanding of pointers, from the basics of how pointers function at the machine level, to using them for a variety of common and advanced scenarios. This short contemporary guide book on pointers in C programming provides a resource for professionals and advanced students

A Structured Programming Approach to Dat
✍ Derek Coleman (auth.) 📂 Library 📅 1979 🏛 Springer-Verlag New York 🌐 English

<p>Much of current programming practice is basically empirical and ad hoc in approach. Each problem is tackled without relation to those that have gone before; experiences are made and stored as a series of fragments. Now, under the pressure of events, this unsatisfactory state of affairs is coming

A Tutorial On Pointers And Arrays In C
✍ Jensen Ted. 📂 Library 🌐 English

2003. — 53 p.<div class="bb-sep"></div>Preface <br/>Introduction <br/>What is a Pointer? <br/>Pointer Types and Arrays. <br/>Pointers and Strings <br/>More on Strings <br/>Pointers and Structures <br/>More on Strings and Arrays of Strings <br/>More on Multi-Dimensional Arrays <br/>Pointers to Arrays