Chapter 19. Raw Memory Access

Programs that run in the Java abstract machine see memory as a stack of primitive data for each thread and a bag of objects. Nothing changes type, nothing even has an address. That is a useful model for computations that do not involve resources outside the Java environment, but it cripples Java for applications that deal with memory-mapped hardware.

Native methods are the traditional workaround for the Java language's inability to use an address. They are usually written in C, and sometimes in assembly language. From a linguistic point of view, native methods open the world of pointers to Java applications. Practically, they are an uncomfortable ...

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.