liveBook · Manning

Pointer

A pointer is a value that identifies a memory location and enables indirect access to the data stored there.

How 4 Manning books explain it

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.

Read how Go in Action, Second Edition explains pointer →

.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.

Read how .NET in Action, Second Edition explains pointer →

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.

Read how Systems Programming with Zig explains pointer →

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.

Read how GPU Programming with Triton explains pointer →

Also covered in

What to know first

Related concepts

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.