mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-02-12 09:17:53 +00:00
This change adds a TLS freelist for small dynamic memory allocations. Cosmopolitan's TIB is now 512 bytes in size. Single-threaded malloc() performance isn't impacted by this, until pthread_create() is called. Single-threaded programs may also want to consider using: #include "libc/mem/tinymalloc.inc" Which will shave 30k off the executable size and sometimes go faster.
17 lines
447 B
Text
17 lines
447 B
Text
DESCRIPTION
|
|
|
|
malloc-2.8.6
|
|
written by Doug Lea
|
|
|
|
LICENSE
|
|
|
|
http://creativecommons.org/publicdomain/zero/1.0/
|
|
|
|
LOCAL CHANGES
|
|
|
|
- Use thread-local freelist from cosmo tib
|
|
- Use faster two power roundup for memalign()
|
|
- Poison maps to integrate with Address Sanitizer
|
|
- Introduce __oom_hook() by using _mapanon() vs. mmap()
|
|
- Wrap locks with __threaded check to improve perf lots
|
|
- Use assembly init rather than ensure_initialization()
|