Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Shadow memory

From Wikipedia, the free encyclopedia
This article is about storing additional information on computer memory. For a faster cache for slow memory, seeRandom-access memory § Shadow RAM.
This article has multiple issues. Please helpimprove it or discuss these issues on thetalk page.(Learn how and when to remove these messages)
This article includes alist of references,related reading, orexternal links,but its sources remain unclear because it lacksinline citations. Please helpimprove this article byintroducing more precise citations.(May 2016) (Learn how and when to remove this message)
icon
This articleneeds additional citations forverification. Please helpimprove this article byadding citations to reliable sources. Unsourced material may be challenged and removed.
Find sources: "Shadow memory" – news ·newspapers ·books ·scholar ·JSTOR
(May 2016) (Learn how and when to remove this message)
(Learn how and when to remove this message)

Incomputing,shadow memory is a technique used to track and store information oncomputer memory used by aprogram during its execution. Shadow memory consists of shadow bytes that map to individual bits or one or more bytes in main memory. These shadow bytes are typically invisible to the original program and are used to record information about the original piece of data.

Technique

[edit]

The technique is utilized by memory-error checkers that can store information on which parts of memory have been allocated to the program being checked. This shadow memory is then used for detecting and reporting incorrect accesses of memory, even though the program may not be crashing due to asegmentation fault or similar. An error checker may also store additional information on memory such as which bits have been defined and which ones do not.Memcheck, part of theValgrind suite, uses this to detect undefined behavior resulting from acting on or printing undefined memory values.

Use of shadow memory is however not limited to memory-error checkers, as what information is stored in these shadow bytes is not fixed. It is for instance used byThreadSanitizer, adata race detector.

Shadow memory can be both implemented and used a lot of different ways, and have different performance characteristics. Memcheck for instance tracks values withbit precision, whileAddressSanitizer, part of theclang compiler, is comparatively very fast. Memcheck, like all Valgrind tools, usesbinary translation andinstrumentation to run code manipulating the shadow memory corresponding to program memory use. AddressSanitizer on the other hand is created on compile-time and inserts error-checking code inline into a program during compilation. Its shadow-memory implementation uses a huge reservation of virtual memory for its shadow memory, giving very different performance characteristics.

References

[edit]

General

[edit]
Retrieved from "https://en.wikipedia.org/w/index.php?title=Shadow_memory&oldid=1082377802"
Category:
Hidden categories:

[8]ページ先頭

©2009-2026 Movatter.jp