cosmopolitan/libc/mem
Justine Tunney f7780de24b
Make realloc() go 100x faster on Linux/NetBSD
Cosmopolitan now supports mremap(), which is only supported on Linux and
NetBSD. First, it allows memory mappings to be relocated without copying
them; this can dramatically speed up data structures like std::vector if
the array size grows larger than 256kb. The mremap() system call is also
10x faster than munmap() when shrinking large memory mappings.

There's now two functions, getpagesize() and getgransize() which help to
write portable code that uses mmap(MAP_FIXED). Alternative sysconf() may
be called with our new _SC_GRANSIZE. The madvise() system call now has a
better wrapper with improved documentation.
2024-07-07 12:40:30 -07:00
..
_gc_free.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
alg.h Add C++ demangling to privileged runtime 2024-06-01 20:10:58 -07:00
aligned_alloc.c flip et / noet in modelines 2023-12-07 22:17:11 -05: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
bisect.internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
bsearch.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
bsearch_r.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
BUILD.mk Rewrite memory manager 2024-06-22 05:45:11 -07:00
bulk_free.c Delete ASAN 2024-06-22 05:45:49 -07:00
calloc.c Delete ASAN 2024-06-22 05:45:49 -07: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 Apply clang-format update to repo (#1154) 2024-04-25 10:38:00 -07:00
gc.h Make cosmo.h work a little better 2024-02-21 16:40:09 -08: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 realloc() go 100x faster on Linux/NetBSD 2024-07-07 12:40:30 -07:00
leaks.h Introduce ctl::set and ctl::map 2024-06-23 22:27:11 -07:00
mallinfo.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
malloc.c Fix issue with ctl::vector constructor 2024-06-30 02:26:38 -07: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 Delete ASAN 2024-06-22 05:45:49 -07:00
mergesort.c Release Cosmopolitan v3.3 2024-02-20 13:27:59 -08:00
opensort.c Release Cosmopolitan v3.3 2024-02-20 13:27:59 -08:00
posix_memalign.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
putenv.c Introduce ctl::set and ctl::map 2024-06-23 22:27:11 -07:00
pvalloc.c Make realloc() go 100x faster on Linux/NetBSD 2024-07-07 12:40:30 -07:00
qsort.c Release Cosmopolitan v3.3 2024-02-20 13:27:59 -08: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 Delete ASAN 2024-06-22 05:45:49 -07: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 Fix bug with realpath() on Windows 2024-05-29 18:47:01 -07:00
reverse.internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
setenv.c Introduce ctl::set and ctl::map 2024-06-23 22:27:11 -07:00
shuffle.internal.h Rerun clang-format on the repo (#1217) 2024-06-15 16:34:48 -04: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 Simplify memory manager 2024-07-05 05:47:15 -07:00
valloc.c Make realloc() go 100x faster on Linux/NetBSD 2024-07-07 12:40:30 -07:00
wcsdup.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00