Understanding and Using C Pointers

Core Techniques for Memory Management

Specificaties
Paperback, 223 blz. | Engels
O'Reilly | 1e druk, 2013
ISBN13: 9781449344184
Rubricering
Hoofdrubriek : Computer en informatica
O'Reilly 1e druk, 2013 9781449344184
Verwachte levertijd ongeveer 16 werkdagen

Samenvatting

Improve your programming through a solid understanding of C pointers and memory management. With this practical book, you'll learn how pointers provide the mechanism to dynamically manipulate memory, enhance support for data structures, and enable access to hardware. Author Richard Reese shows you how to use pointers with arrays, strings, structures, and functions, using memory models throughout the book.

Difficult to master, pointers provide C with much flexibility and power-yet few resources are dedicated to this data type. This comprehensive book has the information you need, whether you're a beginner or an experienced C or C++ programmer or developer.

- Get an introduction to pointers, including the declaration of different pointer types
- Learn about dynamic memory allocation, de-allocation, and alternative memory management techniques
- Use techniques for passing or returning data to and from functions
- Understand the fundamental aspects of arrays as they relate to pointers
- Explore the basics of strings and how pointers are used to support them
- Examine why pointers can be the source of security problems, such as buffer overflow
- Learn several pointer techniques, such as the use of opaque pointers, bounded pointers and, the restrict keyword

Specificaties

ISBN13:9781449344184
Taal:Engels
Bindwijze:paperback
Aantal pagina's:223
Uitgever:O'Reilly
Druk:1
Verschijningsdatum:15-5-2013

Over Richard Reese

Richard Reese has worked in the industry and academics for the past 29 years. For 10 years he provided software development support at Lockheed and at one point developed a C based network application. He was a contract instructor providing software training to industry for 5 years. Richard is currently an Associate Professor at Tarleton State University in Stephenville Texas.

Andere boeken door Richard Reese

Inhoudsopgave

Preface

1. Introduction
-Pointers and Memory
-Pointer Size and Types
-Pointer Operators
-Common Uses of Pointers
-Summary

2. Dynamic Memory Management in C
-Dynamic Memory Allocation
-Dynamic Memory Allocation Functions
-Deallocating Memory Using the free Function
-Dangling Pointers
-Dynamic Memory Allocation Technologies
-Summary

3. Pointers and Functions
-Program Stack and Heap
-Passing and Returning by Pointer
-Function Pointers
-Summary

4. Pointers and Arrays
-Quick Review of Arrays
-Pointer Notation and Arrays
-Using malloc to Create a One-Dimensional Array
-Using the realloc Function to Resize an Array
-Passing a One-Dimensional Array
-Using a One-Dimensional Array of Pointers
-Pointers and Multidimensional Arrays
-Passing a Multidimensional Array
-Dynamically Allocating a Two-Dimensional Array
-Jagged Arrays and Pointers
-Summary

5. Pointers and Strings
-String Fundamentals
-Standard String Operations
-Passing Strings
-Returning Strings
-Function Pointers and Strings
-Summary

6. Pointers and Structures
-Introduction
-Structure Deallocation Issues
-Avoiding malloc/free Overhead
-Using Pointers to Support Data Structures

7. Security Issues and the Improper Use of Pointers
-Pointer Declaration and Initialization
-Pointer Usage Issues
-Memory Deallocation Issues
-Using Static Analysis Tools
-Summary

8. Odds and Ends
-Casting Pointers
-Aliasing, Strict Aliasing, and the restrict Keyword
-Threads and Pointers
-Object-Oriented Techniques
-Summary

Index

Net verschenen

Rubrieken

Populaire producten

    Personen

      Trefwoorden

        Understanding and Using C Pointers