Tags: Programming Language.

Locks-and-keys is a solution to dangling pointers in computer programming languages.The locks-and-keys approach represents pointers as ordered pairs (key address) where the key is an integer value. Heap-dynamic variables are represented as the storage for the variable plus a cell for an integer. When a variable is allocated a lock value is created and placed both into the variable’s cell and into the variable’s ordered pair.

Loading...

This page contains content from the copyrighted Wikipedia article "Locks-and-keys"; that content is used under the GNU Free Documentation License (GFDL). You may redistribute it, verbatim or modified, providing that you comply with the terms of the GFDL.