St Andrews Research Repository

St Andrews University Home
View Item 
  •   St Andrews Research Repository
  • University of St Andrews Research
  • University of St Andrews Research
  • University of St Andrews Research
  • View Item
  •   St Andrews Research Repository
  • University of St Andrews Research
  • University of St Andrews Research
  • University of St Andrews Research
  • View Item
  •   St Andrews Research Repository
  • University of St Andrews Research
  • University of St Andrews Research
  • University of St Andrews Research
  • View Item
  • Register / Login
JavaScript is disabled for your browser. Some features of this site may not work without it.

Low-cost deterministic C++ exceptions for embedded systems

Thumbnail
View/Open
Renwick_2019_PICCC_Low_cost_deterministic_C_exceptions_for_embedded_systems_AAM.pdf (795.8Kb)
Date
16/02/2019
Author
Renwick, James
Spink, Tom
Franke, Bjoern
Keywords
C++
Exceptions
Error handling
Software performance
Language features
QA75 Electronic computers. Computer science
NDAS
Metadata
Show full item record
Abstract
The C++ programming language offers a strong exception mechanism for error handling at the language level, improving code readability, safety, and maintainability. However, current C++ implementations are targeted at general-purpose systems, often sacrificing code size, memory usage, and resource determinism for the sake of performance. This makes C++ exceptions a particularly undesirable choice for embedded applications where code size and resource determinism are often paramount. Consequently, embedded coding guidelines either forbid the use of C++ exceptions, or embedded C++ tool chains omit exception handling altogether. In this paper, we develop a novel implementation of C++ exceptions that eliminates these issues, and enables their use for embedded systems. We combine existing stack unwinding techniques with a new approach to memory management and run-time type information (RTTI). In doing so we create a compliant C++ exception handling implementation, providing bounded runtime and memory usage, while reducing code size requirements by up to 82%, and incurring only a minimal runtime overhead for the common case of no exceptions.
Citation
Renwick , J , Spink , T & Franke , B 2019 , Low-cost deterministic C++ exceptions for embedded systems . in Proceedings of the 28th International Conference on Compiler Construction (CC ’19) : February 16–17, 2019, Washington, DC, USA . ACM , Washington, DC, USA , pp. 76–86 , 28th International Conference on Compiler Construction , Washington DC , United States , 16/02/19 . https://doi.org/10.1145/3302516.3307346
 
conference
 
Publication
Proceedings of the 28th International Conference on Compiler Construction (CC ’19)
DOI
https://doi.org/10.1145/3302516.3307346
Type
Conference item
Rights
Copyright © 2019 Copyright held by the owner/author(s). Publication rights licensed to ACM. This work has been made available online in accordance with publisher policies or with permission. Permission for further reuse of this content should be sought from the publisher or the rights holder. This is the author created accepted manuscript following peer review and may differ slightly from the final published version. The final published version of this work is available at https://doi.org/10.1145/3302516.3307346.
Collections
  • University of St Andrews Research
URI
http://hdl.handle.net/10023/24323

Items in the St Andrews Research Repository are protected by copyright, with all rights reserved, unless otherwise indicated.

Advanced Search

Browse

All of RepositoryCommunities & CollectionsBy Issue DateNamesTitlesSubjectsClassificationTypeFunderThis CollectionBy Issue DateNamesTitlesSubjectsClassificationTypeFunder

My Account

Login

Open Access

To find out how you can benefit from open access to research, see our library web pages and Open Access blog. For open access help contact: openaccess@st-andrews.ac.uk.

Accessibility

Read our Accessibility statement.

How to submit research papers

The full text of research papers can be submitted to the repository via Pure, the University's research information system. For help see our guide: How to deposit in Pure.

Electronic thesis deposit

Help with deposit.

Repository help

For repository help contact: Digital-Repository@st-andrews.ac.uk.

Give Feedback

Cookie policy

This site may use cookies. Please see Terms and Conditions.

Usage statistics

COUNTER-compliant statistics on downloads from the repository are available from the IRUS-UK Service. Contact us for information.

© University of St Andrews Library

University of St Andrews is a charity registered in Scotland, No SC013532.

  • Facebook
  • Twitter