Peek and Poke

Peek and poke are the names for the basic language functions that access memory by address. Peek takes an address as its parameter and returns the value at that address. Poke takes an address and a value as parameters and stores the value at the address. The RTSJ could have created analogs for peek and poke, but that would have required careful checking of the thread's right to access a particular address on every call. That is the best design if the application is not expected to revisit addresses. The RTSJ expects raw memory access to be used for memory-mapped I/O and regions of memory that are shared with software outside the JVM. These applications heavily use a few locations (or small regions) in memory.

The first step in raw ...

Get Real-Time Java™ Platform Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.