The final Frontier: Coping With Immutable Data in a JVM for Embedded Real-Time Systems

2014 
Managed, type-safe languages such as Java are becoming an increasingly competitive alternative for programming realtime and embedded applications, a field which has traditionally been dominated by C. However, one peculiar issue in the use of Java is the insufficient way immutable data is handled. There are some important cases, such as primitive arrays, where the final keyword is not expressive enough to declare data as truly constant. This leads to an unnecessary increase in both code size and runtime memory footprint. Moreover, it prevents the compiler from applying its optimisations as aggressively as would be possible. In this paper, we propose a set of compiler techniques to improve the handling of immutable data in embedded Java applications. Our approach includes (a) detecting constant program data that could not be declared as such by the programmer, (b) eliminating the overhead associated with it, and (c) providing an automated way to allocate that data in flash memory in order to save RAM.
    • Correction
    • Source
    • Cite
    • Save
    • Machine Reading By IdeaReader
    15
    References
    2
    Citations
    NaN
    KQI
    []