~dokomix/dokomix/+git/taisei:memory-wrappers

Last commit made on 2023-01-18
Get this branch:
git clone -b memory-wrappers https://git.launchpad.net/~dokomix/dokomix/+git/taisei

Branch merges

Branch information

Name:
memory-wrappers
Repository:
lp:~dokomix/dokomix/+git/taisei

Recent commits

b697817... by Andrei Alexeyev <email address hidden>

memory: use custom memory allocation wrappers

Introduces wrappers around memory allocation functions in `memory.h`
that should be used instead of the standard C ones.

These never return NULL and, with the exception of `mem_realloc()`,
zero-initialize the allocated memory like `calloc()` does.

All allocations made with the memory.h API must be deallocated with
`mem_free()`. Although standard `free()` will work on some platforms,
it's not portable (currently it won't work on Windows). Likewise,
`mem_free()` must not be used to free foreign allocations.

The standard C allocation functions are now diagnosed as deprecated.
They are, however, available with the `libc_` prefix in case interfacing
with foreign APIs is required. So far they are only used to implement
`memory.h`.

Perhaps the most important change is the introduction of the `ALLOC()`,
`ALLOC_ARRAY()`, and `ALLOC_FLEX()` macros. They take a type as a
parameter, and allocate enough memory with the correct alignment for
that type. That includes overaligned types as well. In most
circumstances you should prefer to use these macros. See the `memory.h`
header for some usage examples.

8a3a82c... by Alice D <email address hidden>

fix typo in credits

0a8875a... by Alice D <email address hidden>

update credits

bbe6bb3... by Andrei Alexeyev <email address hidden>

util/geometry: add as_array accessors to FloatOffset, FloatExtent, and FloatRect

deb7e7a... by Andrei Alexeyev <email address hidden>

resource/font: enlarge glyph spritesheet size

Should fit all characters in a single texture for 4k resolution.

d36a040... by Andrei Alexeyev <email address hidden>

dialog/reimu: fix typo

ac1133d... by Andrei Alexeyev <email address hidden>

vfs: silence -Wnullability-completeness warnings from zip.h on clang

fe2b691... by Andrei Alexeyev <email address hidden>

log: fixup module name separators on windows

74f07d6... by Andrei Alexeyev <email address hidden>

gamepad: use dynarray for devices

11c9bf6... by Andrei Alexeyev <email address hidden>

compat: add a few more attribute macros