Pointer
A pointer is a value that identifies a memory location and enables indirect access to the data stored there.
Go in Action, Second Edition
A pointer type is a Go type whose values identify the memory locations of values of a specified target type.
- How it is used
- Uses pointers to share data, avoid copying large values, and update original values.
- How deep it goes
- Explains addresses, dereferencing, nil, and creation with new and struct literals, then contrasts pointer passing with array copying.
- Examples
- Uses integer pointers, an initialized person struct, and a large image array passed to a processing function.
- What you can do after
- Apply Go pointers to share and modify values and pass large arrays without copying them.
.NET in Action, Second Edition
A pointer is a value that represents a memory address and can be used to access or manipulate the addressed storage.
- How it is used
- Connects heap access and runtime-sized allocation to a comparison of C++ pointers and C# arrays.
- How deep it goes
- Explains pointer access through stack frames and heap allocation, then shows unsafe C# pointer use without detailing pointer representation.
- Examples
- Uses a C++ function returning a dynamic array and a C# function copying arrays with pointers.
- What you can do after
- Build it from scratch: copy a C# array using pointers within `unsafe` and `fixed` blocks.
Systems Programming with Zig
A pointer type represents values that refer to memory locations or other objects.
- How it is used
- Uses pointers as a practical way to interact with data in memory and control memory access.
- How deep it goes
- Defines raw machine pointers, explains memory hazards, and compares pointer-related type spellings and operations.
- Examples
- Compares single-item pointers, many-item pointers, array pointers, arrays, and slices in a type-and-operation table.
- What you can do after
- Evaluate pointer-related types by element count and supported operations, and recognize common invalid-memory hazards.
GPU Programming with Triton
A pointer is a variable that stores a memory address used to locate data in memory.
- How it is used
- Uses pointers as base addresses for locating tensor data during GPU kernel loads and stores.
- How deep it goes
- Defines pointers and explains tensor conversion and offset-based access, without detailing lower-level address representation.
- Examples
- Shows x_ptr, y_ptr, and z_ptr as kernel parameters for input and output data.
- What you can do after
- Apply via Triton by passing tensors to a kernel and using pointer bases with offsets for memory access.
Also covered in
- Algorithms Every Programmer Should KnowIn early access (MEAP)
- Logs and Telemetry
- Grokking GPU ProgrammingIn early access (MEAP)
What to know first
- C++C++ is a statically typed, general-purpose programming language that supports procedural, object-oriented, generic, and low-level systems programming.
- GPU memoryGPU memory is memory available to a graphics processing unit for storing data and state used in graphics or computation.
- type systemA type system is a set of rules that classifies program values and expressions and constrains their valid uses and operations.
- reference typeA reference type is a type whose values provide indirect access to data or objects stored separately from those values.
Related concepts
- atomicAddused by · atomicAdd is a CUDA atomic operation that adds a value to a memory location without allowing conflicting concurrent updates to interleave.
- memory locationuses · A memory location is an addressable unit or region of computer memory identified for storing or accessing data or instructions.
Questions about pointer
What is pointer?
A pointer is a value that identifies a memory location and enables indirect access to the data stored there.
Which Manning books explain pointer?
Go in Action, Second Edition, .NET in Action, Second Edition, Systems Programming with Zig and GPU Programming with Triton.
What should I know before learning pointer?
Manning books that teach pointer usually introduce C++, GPU memory, type system and reference type first.
What kinds of pointer are there?
Kinds of pointer include character pointer, host pointer and immutable raw pointer.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.



