Ma************@web.de wrote:
# Programming interfaces are available that provide notifications if a
# piece of memory was accessed.
# Do you need them for debugging and safety checks?
They are frequently used for debugging. If a variable changes unexpected,
you can do stuff to the page it's in and have a debugger check when the
hardware reference the page.
# -
http://tcl.tk/man/tcl8.5/TclLib/TraceVar.htm
This is a very different creature than when you trace variables in a
compiled language like C. Tcl is an interpretter, and setting and
referencing of a variable is handled by a function. So variable traces
are added without using anything in the underlying hardware. It makes
the implementation cheaper, so Tcl traces are a frequent programming
technique.
# How do you think about the chances that this kind of functionality can
# be added to the standard API for memory management?
Not in ANSI C because ANSI C has to run on CPUs without the required
hardware. You can define an interface for VM functions and then
provide some implementations for say Windows and Linux. Whether anybody
but you will ever use it depends on issues other than technical merit.
--
SM Ryan
http://www.rawbw.com/~wyrmwif/
Leave it to the Catholics to destroy existence.