MISSION CRITICAL RUST: Managing Memory

MISSION CRITICAL RUST: Managing Memory

Pointer errors have plagued software developers for decades. Rust’s innovative and expressive approach helps make pointers safe and efficient. Pointers have been a staple of programming languages since the earliest days of computing, serving two purposes:

• Indirection: a means to share (rather than copy) data values within a program. This can be implicit, for example by passing a variable as a “by reference” parameter, or explicit through syntax for reference creating / dereferencing (such as “&x” and “*p” in C).

• Dynamic allocation: a means to construct and manipulate data structures (linked lists, trees, graphs, …) that can grow and shrink during program execution. However, with power comes danger, and pointers can compromise both safety and performance. This paper investigates the challenges that pointers bring and explains how Rust meets these challenges.

Rust’s approach requires programmers to think about pointers in a new way, but the effect is memory safety / early detection of pointer errors and efficient performance, with the expressiveness of a general-purpose data structuring facility.

Pointer Errors Still Costing You?
See how Rust avoids dangling references, data races and null dereferencing.

Read the paper

Download 776.253 KB pdf

Contact Us

A professional email address is required.

Ready to apply Rust in your mission-critical projects? Learn more about GNAT Pro for Rust — AdaCore’s solution for high-assurance embedded software development in Rust.