Skip to content

Add a toolchain provided ALLOCATOR = DEBUG #782

@ZERICO2005

Description

@ZERICO2005

We currently offer three ALLOCATOR implementations:

  • ALLOCATOR = STANDARD as a good default (~200 bytes)
  • ALLOCATOR = SIMPLE smallest possible conforming malloc implementation (34 bytes). Doesn't actually "free" memory so it has some debugging value.
  • ALLOCATOR = CUSTOM user provides their own malloc/free/realloc implementation

It may also be valuable to provide ALLOCATOR = DEBUG, which can function similarly to some memory sanitizers. For example, uninitialized heap could be set to 0xFA, free'd memory can be set to 0xFB, malloc'ed memory can be set to 0xFC, and so on. The user can use this information to determine if they have a use after free, or etc.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions