cosmopolitan/libc/mem
Justine Tunney 624573207e
Make threads faster and more reliable
This change doubles the performance of thread spawning. That's thanks to
our new stack manager, which allows us to avoid zeroing stacks. It gives
us 15µs spawns rather than 30µs spawns on Linux. Also, pthread_exit() is
faster now, since it doesn't need to acquire the pthread GIL. On NetBSD,
that helps us avoid allocating too many semaphores. Even if that happens
we're now able to survive semaphores running out and even memory running
out, when allocating *NSYNC waiter objects. I found a lot more rare bugs
in the POSIX threads runtime that could cause things to crash, if you've
got dozens of threads all spawning and joining dozens of threads. I want
cosmo to be world class production worthy for 2025 so happy holidays all
2024-12-21 22:13:00 -08:00
..
_gc_free.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
alg.h Make improvements 2024-09-01 01:27:47 -07:00
aligned_alloc.c Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
alloca.h Remove some dead code 2023-07-03 02:48:29 -07:00
arraylist.internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
arraylist2.internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
BUILD.mk Release Cosmopolitan v3.8.0 2024-08-30 20:14:07 -07:00
bulk_free.c Delete ASAN 2024-06-22 05:45:49 -07:00
calloc.c Fix MODE=tiny build 2024-12-17 01:36:29 -08:00
critbit0.h Add dontthrow attribute to most libc functions 2024-01-09 01:26:03 -08:00
critbit0_allprefixed.c Apply clang-format update to repo (#1154) 2024-04-25 10:38:00 -07:00
critbit0_clear.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
critbit0_contains.c Apply clang-format update to repo (#1154) 2024-04-25 10:38:00 -07:00
critbit0_delete.c Apply clang-format update to repo (#1154) 2024-04-25 10:38:00 -07:00
critbit0_emplace.c Apply clang-format update to repo (#1154) 2024-04-25 10:38:00 -07:00
critbit0_get.c Apply clang-format update to repo (#1154) 2024-04-25 10:38:00 -07:00
critbit0_insert.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
free.c Delete ASAN 2024-06-22 05:45:49 -07:00
gc.c Fix greenbean example 2024-07-07 17:52:33 -07:00
gc.h Make cosmo.h work a little better 2024-02-21 16:40:09 -08:00
grow.c Fix regression in package.ape build tool 2024-09-17 02:54:17 -07:00
heapsort.c Release Cosmopolitan v3.3 2024-02-20 13:27:59 -08:00
internal.h Add dontthrow attribute to most libc functions 2024-01-09 01:26:03 -08:00
leaks.c Make threads faster and more reliable 2024-12-21 22:13:00 -08:00
leaks.h Eliminate cyclic locks in runtime 2024-12-16 22:25:12 -08:00
levenshtein.c Fix the build 2024-08-26 16:44:05 -07:00
mallinfo.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
malloc.c Fix MODE=tiny build 2024-12-17 01:36:29 -08:00
malloc_inspect_all.c Make malloc() go 200x faster 2024-06-05 02:02:14 -07:00
malloc_trim.c Delete ASAN 2024-06-22 05:45:49 -07:00
malloc_usable_size.c Delete ASAN 2024-06-22 05:45:49 -07:00
mallopt.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
mem.h Add dontthrow attribute to most libc functions 2024-01-09 01:26:03 -08:00
memalign.c Fix MODE=tiny build 2024-12-17 01:36:29 -08:00
mergesort.c Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
opensort.c Release Cosmopolitan v3.3 2024-02-20 13:27:59 -08:00
posix_memalign.c Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
putenv.c Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
pvalloc.c Create variables for page size 2024-07-18 21:16:53 -07:00
qsort.c Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
radix_sort_int32.c Rerun clang-format on the repo (#1217) 2024-06-15 16:34:48 -04:00
radix_sort_int64.c Rerun clang-format on the repo (#1217) 2024-06-15 16:34:48 -04:00
realloc.c Fix MODE=tiny build 2024-12-17 01:36:29 -08:00
realloc_in_place.c Delete ASAN 2024-06-22 05:45:49 -07:00
reallocarray.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
realpath.c Get rid of .internal.h convention in LIBC_INTRIN 2024-07-19 19:38:00 -07:00
reverse.internal.h Get rid of .internal.h convention in LIBC_INTRIN 2024-07-19 19:38:00 -07:00
setenv.c Get rid of .internal.h convention in LIBC_INTRIN 2024-07-19 19:38:00 -07:00
shuffle.internal.h Get rid of .internal.h convention in LIBC_INTRIN 2024-07-19 19:38:00 -07:00
sortedints.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
sortedints.internal.h Add dontthrow attribute to most libc functions 2024-01-09 01:26:03 -08:00
strdup.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
strndup.c Apply clang-format update to repo (#1154) 2024-04-25 10:38:00 -07:00
tinymalloc.inc Get monorepo fully building on Windows again 2024-09-12 05:07:21 -07:00
valloc.c Create variables for page size 2024-07-18 21:16:53 -07:00
wcsdup.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00