cosmopolitan/libc/mem
Justine Tunney 69f4152f38 Always initialize thread local storage
We had previously not enabled TLS in MODE=tiny in order to keep the
smallest example programs (e.g. life.com) just 16kb in size. But it
was error prone doing that, so now we just always enable it because
this change uses hacks to ensure it won't increase life.com's size.

This change also fixes a bug on NetBSD, where signal handlers would
break thread local storage if SA_SIGINFO was being used. This looks
like it might be a bug in NetBSD, but it's got a simple workaround.
2022-07-19 00:21:46 -07:00
..
cxx Clean old .source directive out of asm code 2022-03-18 12:43:21 -07:00
hook Clean old .source directive out of asm code 2022-03-18 12:43:21 -07:00
aligned_alloc.c Use re-entrant locks on stdio 2022-05-22 08:28:33 -07:00
alloca.h Initial import 2020-06-15 07:18:57 -07:00
arena.c Make dlmalloc a little faster 2022-06-09 21:25:21 -07:00
arena.h Make fixes, improvements, and chibicc python bindings 2021-10-08 08:41:57 -07:00
asprintf.c Use re-entrant locks on stdio 2022-05-22 08:28:33 -07:00
balloc.c Improve memory safety 2021-10-13 17:27:13 -07:00
bfree.c Change license 2020-12-27 17:18:44 -08:00
bulk_free.S Make fixes, improvements, and chibicc python bindings 2021-10-08 08:41:57 -07:00
calloc.S Use re-entrant locks on stdio 2022-05-22 08:28:33 -07:00
copyfd.c Improve system call support on NT 2022-04-07 20:30:04 -07:00
defer.greg.c Improve memory safety 2021-10-13 17:27:13 -07:00
fmt.h Make Cosmopolitan ANSI C89 compatible 2021-02-03 17:48:59 -08:00
free.S Use re-entrant locks on stdio 2022-05-22 08:28:33 -07:00
gc.c Expose public garbage collector API for C language 2021-03-08 10:59:34 -08:00
get_current_dir_name.c Use re-entrant locks on stdio 2022-05-22 08:28:33 -07:00
internal.h Improve memory safety 2021-10-13 17:27:13 -07:00
io.h Improve system call support on NT 2022-04-07 20:30:04 -07:00
mallinfo.c Improve synchronization 2022-04-15 15:31:55 -07:00
malloc.S Use re-entrant locks on stdio 2022-05-22 08:28:33 -07:00
malloc_inspect_all.c Improve synchronization 2022-04-15 15:31:55 -07:00
malloc_trim.S Remove more nonstandard stuff from cosmopolitan.h 2021-03-01 00:18:23 -08:00
malloc_usable_size.S Use re-entrant locks on stdio 2022-05-22 08:28:33 -07:00
mem.h Improve synchronization 2022-04-15 15:31:55 -07:00
mem.mk Make improvements 2022-04-28 09:57:07 -07:00
memalign.S Use re-entrant locks on stdio 2022-05-22 08:28:33 -07:00
pledge.c Improve pledge() and unveil() 2022-07-18 07:58:20 -07:00
posix_memalign.c Use re-entrant locks on stdio 2022-05-22 08:28:33 -07:00
putenv.c Make some systemic improvements 2022-05-18 16:52:36 -07:00
pvalloc.c Use re-entrant locks on stdio 2022-05-22 08:28:33 -07:00
realloc.S Use re-entrant locks on stdio 2022-05-22 08:28:33 -07:00
realloc_in_place.S Use re-entrant locks on stdio 2022-05-22 08:28:33 -07:00
reallocarray.c Use re-entrant locks on stdio 2022-05-22 08:28:33 -07:00
setenv.c Introduce --strace flag for system call tracing 2022-03-18 18:07:28 -07:00
strdup.c Use re-entrant locks on stdio 2022-05-22 08:28:33 -07:00
strndup.c Use re-entrant locks on stdio 2022-05-22 08:28:33 -07:00
unhexstr.c Import C++ Standard Template Library 2022-03-22 06:41:54 -07:00
unveil.c Always initialize thread local storage 2022-07-19 00:21:46 -07:00
valloc.c Use re-entrant locks on stdio 2022-05-22 08:28:33 -07:00
vasprintf.c Use re-entrant locks on stdio 2022-05-22 08:28:33 -07:00
wcsdup.c Use re-entrant locks on stdio 2022-05-22 08:28:33 -07:00