preface 1. introduction pointers and memory why you should bee proficient with pointers declaring pointers how to read a declaration address of operator displaying pointer values dereferencing a pointer using the indirection operator pointers to functions the concept of null pointer size and types memory models predefined pointer-related types pointer operators pointer arithmetic paring pointers mon uses of pointers multiple levels of indirection constants and pointers summary 2. dynamic memory management in c dynamic memory allocation memory leaks dynamic memory allocation functions using the malloc function using the calloc function using the realloc function the alloca function and variable length arrays deallocating memory using the free function assigning null to a freed pointer double free the heap and system memory freeing memory upon program termination dangling pointers dangling pointer examples dealing with dangling pointers debug version support for detecting memory leaks dynamic memory allocation technologies garbage collection in c resource acquisition is initialization using exception handlers summary 3. pointers and functions program stack and heap program stack organization of a stack frame passing and returning by pointer passing data using a pointer passing data by value passing a pointer to a constant returning a pointer pointers to local data passing null pointers passing a pointer to a pointer function pointers declaring function pointers using a function pointer passing function pointers returning function pointers using an array of function pointers paring function pointers casting function pointers summary 4. pointers and arrays quick review of arrays one-dimensional arrays two-dimensional arrays multidimensional arrays pointer notation and arrays differences between arrays and pointers using malloc to create a one-dimensional array using the realloc function to resize an array passing a one-dimensional array using array notation using pointer notation using a one-dimensional array of pointers pointers and multidimensional arrays passing a multidimensional array dynamically allocating a two-dimensional array allocating potentially noncontiguous memory allocating contiguous memory jagged arrays and pointers summary 5. pointers and strings string fundamentals string declaration the string literal pool string initialization standard string operations paring strings copying strings concatenating strings passing strings passing a simple string passing a pointer to a constant char passing a string to be initialized passing arguments to an application returning strings returning the address of a literal returning the address of dynamically allocated memory function pointers and strings summary 6. pointers and structures introduction how memory is allocated for a structure structure deallocation issues avoi malloc/free overhead using pointers to support data structures single-linked list using pointers to support a queue using pointers to support a stack using pointers to support a tree summary 7. security issues and the improper use of pointers pointer declaration and initialization improper pointer declaration failure to initialize a pointer before it is used dealing with uninitialized pointers pointer usage issues test for null misuse of the dereference operator dangling pointers accessing memory outside the bounds of an array calculating the array size incorrectly misusing the sizeof operator always match pointer types bounded pointers string security issues pointer arithmetic and structures function pointer issues memory deallocation issues double free clearing sensitive data using static analysis tools summary 8. odds and ends casting pointers accessing a spe pure address accessing a port accessing memory using dma determining the endianness of a machine aliasing, strict aliasing, and the restrict keyword using a union to represent a value in multiple ways strict aliasing using the restrict keyword threads and pointers sharing pointers between threads using function pointers to support callbacks object-oriented techniques creating and using an opaque pointer polymorphism in c summary index
以下为对购买帮助不大的评价