Memory safety

Uses your system voice; voice and rate in settings.

Snapshot

≈ 2 min read

Names in other languages

No names in other languages are held for this entry yet.

Article bodies are English and are not machine-translated. A name in another language is not a translation of the article.

Memory safety is the state of being protected from various software bugs and security vulnerabilities when dealing with memory access, such as buffer overflows and dangling pointers. For example, Java is memory-safe because its runtime error detection checks array bounds and pointer dereferences. By contrast, programming languages like C, C++, and Fortran allow arbitrary pointer arithmetic with pointers implemented as direct memory addresses with no provision for bounds checking, making them memory-unsafe. Memory-unsafe code is typically found in low level programming, with higher level programming languages generally incorporating either garbage collection or static analysis (as in Rust) to prevent such errors.

Memory safety is the state of being protected from various software bugs and security vulnerabilities when dealing with memory access, such as buffer overflows and dangling pointers. For example, Java is memory-safe because its runtime error detection checks array bounds and pointer dereferences. By contrast, programming languages like C, C++, and Fortran allow arbitrary pointer arithmetic with pointers implemented as direct memory addresses with no provision for bounds checking, making them memory-unsafe. Memory-unsafe code is typically found in low level programming, with higher level programming languages generally incorporating either garbage collection or static analysis (as in Rust) to prevent such errors.

Text derived from https://en.wikipedia.org/w/index.php?oldid=1375273789 under CC BY-SA 4.0; modifications have been made.

Sources cited in this revision

Extracted from the cited revision's reference blocks; absent citations are not invented.