taisei/src/memory
Andrei Alexeyev fda8556a39
src: deprecate strdup(), use mem_strdup() explicitly
This fixes a nasty bug that manifests on windows when building without
precompiled headers. util/stringops.h used to silently replace strdup
with a macro that's compatible with mem_free(). This header would
typically be included everywhere due to PCH, but without it the strdup
from libc would sometimes be in scope. On most platforms mem_free() is
equivalent to free(), but not on windows, because we have to use
_aligned_free() there. Attempting to mem_free() the result of a libc
strdup() would segfault in such a configuration.

Avoid the footgun by banning strdup() entirely. Maybe redefining libc
names isn't such a great idea, who knew?
2024-09-10 14:31:55 +02:00
..
allocator.c src: the great #include massacre of 2024 2024-05-17 14:11:48 +02:00
allocator.h src: run upkeep 2024-05-17 04:58:47 +02:00
arena.c memory/arena: add marena_alloc_array_aligned() 2024-08-30 11:52:47 +02:00
arena.h memory/arena: add ARENA_ALLOC series of macros 2024-08-30 11:52:47 +02:00
memory.c memory: fix mem_realloc edge case on windows 2024-09-10 14:28:36 +02:00
memory.h src: deprecate strdup(), use mem_strdup() explicitly 2024-09-10 14:31:55 +02:00
mempool.c memory/mempool: fix warning 2024-06-15 09:31:14 +02:00
mempool.h memory/mempool: pass arena pointer to acquire() instead of storing in struct 2024-06-05 22:07:17 +02:00
meson.build memory/mempool: rename from objectpool 2024-06-05 18:35:08 +02:00
util.h src: run upkeep 2024-05-17 04:58:47 +02:00