Topic: dangling pointers

topics > computer science > data > Group: access to data

memory management

memory management by garbage collection
pointer rotation
pointers to data
safe use of pointers


If an object has multiple references, deallocation may be difficult. Deallocation by use counts is error prone and adds a fixed overhead to each object. Garbage collection acts only when memory allocation fails, but it is often a slow process. Hardware tombstones left with dead objects provide automatic nullification of all referencing pointers. (cbb 5/80)
Subtopic: dangling pointers up

Quote: with explicit storage allocation, programmer must avoid dangling references and storage leaks [»swinDC7_1985]
Quote: invalid pointers with explicit storage allocation from not initializing, bad arithmetic, type coercions [»swinDC7_1985]
Quote: replacement through invalid pointers can cause difficult-to-resolve overwrites
Quote: dangling pointers and storage leaks tend to persist long after other errors are removed; prevent with garbage collection [»nelsG_1991]
Quote: referential integrity if every foreign key refers to a primary key unless marked as a missing values [»coddEF_1990]
Quote: prevent dereferencing a deallocated heap pointer by replacing malloc with a garbage collector [»necuGC5_2005]

Subtopic: alias burying up

Quote: use alias burying to avoid destructive reads of 'read-once' variables; aliases must be dead when reading a unique field of possibly shared objects; static enforcement by restricting aliases across procedure calls [»boylJ5_2001]

Subtopic: tombstone up

Quote: leave a tombstone after deleting a data structure to invalidate pointers [»lomeDB1_1985]
Quote: catch dangling references by leaving a tombstone after the object is destroyed; needs hardware assistance [»lomeDB1_1975]
Quote: implement tombstones by indirect addressing for all pointers; then an invalid address will be caught by hardware [»lomeDB1_1985]

Subtopic: pointer scope up

Quote: associate scope with a pointer to avoid dangling pointers [»lomeDB1_1985]
Quote: assign pointer scope and the freeze all data structures until the scope terminates; an explicit free then has a delayed effect [»lomeDB1_1985]

Subtopic: two-way pointers up

Quote: some frame languages use two-way pointers to update inverse relations; avoids tangling pointers by automatically updating all references

Related Topics up

Group: memory management   (11 topics, 367 quotes)

Topic: aliasing (28 items)
Topic: memory management by garbage collection (116 items)
Topic: pointer rotation (11 items)
Topic: pointers to data (55 items)
Topic: safe use of pointers
(102 items)

Updated barberCB 5/04
Copyright © 2002-2008 by C. Bradford Barber. All rights reserved.
Thesa is a trademark of C. Bradford Barber.