Skip to content

Operator new improvements #287

Closed
@matthijskooijman

Description

@matthijskooijman

In arduino/Arduino#108, some improvements to the operator new provided by Arduino were suggested (since the current forms are not standards-compliant wrt error handling IIRC). The PR itself originally suggested to remove them and include uclibc++ instead, but after some discussion, we concluded that it would be better to:

  • Copy the new and delete implementations from uclibc++ (including array, placement and nothrow versions).
  • Change it to remove throw(std::bad_alloc).
  • Define a weak std::__throw_bad_alloc that calls std::terminate()
  • Define a weak std::terminate that calls abort()

I think the PR itself is not really useful directly, but the dicussion on it is. I do not recall the details right now, but wanted to at least keep record of this here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions