get playdate
v1.13.4

Module playdate.allocator

Source

source/playdate/allocator.d

Authors

Chance Snow

License

MIT License

Members

  • pd

    static PlaydateAPI* pd;
  • theAllocator

    static PDAllocator theAllocator;

    The global instance of this allocator

  • PDAllocator

    struct PDAllocator;

    Playdate heap allocator.

    Remarks

    Adapted from std.experimental.allocator.mallocator

    • alignment

      enum uint alignment;

      The alignment is a static constant equal to platformAlignment, which ensures proper alignment for any D data type.

      The alignment that is guaranteed to accommodate any D object allocation on the current platform.

    • allocate

      const nothrow @nogc void[] allocate(size_t bytes);
    • deallocate

      const nothrow @nogc @system bool deallocate(void[] b);
    • reallocate

      const nothrow @nogc @system bool reallocate(ref void[] b, size_t s);