Segment-based multiple-base compressed addressing for flexible javascript heap allocation

Gyeonghwan Hong, Dongkun Shin

Research output: Contribution to journalArticlepeer-review

1 Scopus citations

Abstract

Many Internet-of-Things (IoT) systems use lightweight JavaScript engines to support easy programming in microcontrollers. Lightweight JavaScript engines use several techniques for memory optimization, such as static heap reservation and compressed addressing. Recent IoT systems also use several external libraries and a larger on-chip memory to support abundant functionalities, such as machine learning and connectivity. However, as the JavaScript heap space is not resizable owing to the memory optimizations, the JavaScript engine or an external library is prone to fail the memory allocation in these devices. To address this problem, we propose a flexible memory optimization technique, segment-based multiple-base compressed addressing (SMBCA), which compresses a pointer indicating a JavaScript object allocated to a resizable heap based on multiple base addresses. SMBCA comprises two components: a dynamic segment allocator (DSA) and a multiple-base compressed address translator (MBCAT). DSA dynamically allocates the JavaScript heap in segment units. Meanwhile, MBCAT converts a low-bitwidth address into a fullbitwidth address and vice versa, based on the multiple base addresses. To reduce the address compression overhead of MBCAT, we propose a software cache technique, reverse map cache (RMC). We found that the SMBCA reduces average memory usage by 43.9% compared to the existing lightweight JavaScript engines when running SunSpider benchmarks, V8 benchmarks, and real-world applications. We also showed that the RMC reduces the average address compression latency of MBCAT by 34.9% when running the SunSpider benchmarks.

Original languageEnglish
Pages (from-to)185405-185415
Number of pages11
JournalIEEE Access
Volume8
DOIs
StatePublished - 2020
Externally publishedYes

Keywords

  • Compressed addressing
  • Internet of Things
  • JavaScript
  • Memory management
  • Microcontroller

Fingerprint

Dive into the research topics of 'Segment-based multiple-base compressed addressing for flexible javascript heap allocation'. Together they form a unique fingerprint.

Cite this