Skip to content

Releases: jart/cosmopolitan

Cosmopolitan v3.5.6

20 Jul 10:03
3374cbb
Compare
Choose a tag to compare
  • 2018cac Use better memory strategy on Windows
  • 6a5d4ed Fix issue with disabling sigaltstack()

Cosmopolitan v3.5.5

20 Jul 05:49
493ffc9
Compare
Choose a tag to compare

This release perfects the new memory manager. The impact of the mmap()
rewrite (introduced by Cosmo v3.5.0) is that LLaMAfiler's tokenization
endpoint was previously handling 2 million requests per second and now
it's handling 3.3 million per second.

  • 8c645fa Make mmap() scalable
  • 3756870 Implement new red-black tree
  • 1ff037d Add some mmap() documentation
  • f7780de Make realloc() go 100x faster on Linux/NetBSD
  • 76cea6c Squeeze more performance out of memory manager
  • fdab49b Demonstrate signal safety of recursive mutexes
  • 01587de Simplify memory manager

A few disruptive changes slipped in, but they're necessary. Aside from
the changes listed below, please note that you might need to update your
code to use sysconf(_SC_GRANSIZE) instead of sysconf(_SC_PAGESIZE)
when the alignment of the addr or offset parameters to mmap() is
the thing you care about.

  • 1029dcc Reduce default stack size from 256kb to 81kb
  • 86d884c Get rid of .internal.h convention in LIBC_INTRIN
  • fc65422 Remove __mmap() and __munmap()

Other changes:

  • 3f2a1b6 Fix greenbean example
  • 0ed916a Fix a bug in example code
  • 5a9a08d Fix regression in elf2pe program
  • c697133 Fix typo in accept4-sysv.c (#1235)
  • 15ea052 Reduce code size of mandatory runtime
  • 6dbc3fb Add AMD cache sizes to o//tool/viz/cpuid
  • bd6d9ff Get deathstar demo working again on metal
  • 135d538 Make ctl::set use 30% less memory than libcxx

Cosmopolitan v3.5.4

01 Jul 14:35
70f77aa
Compare
Choose a tag to compare

Cosmopolitan v3.5.3

01 Jul 09:37
239f8ce
Compare
Choose a tag to compare

Your cosmocc toolchain now includes five new useful programs: ar.ape,
sha256sum.ape, resymbol, and cocmd. See ca4cf67 for further details.

This release fixes Android support. You can now run LLMs on your phone
using Cosmopolitan software like llamafile. See 78d3b86 for further
details. Thank you @aj47 (techfren.net) for bug
reports and and testing efforts.

We've worked out additional kinks in our new mmap() runtime, which now
has a more bulletproof locking strategy. See 1bf2d8e for details.

This release fixes a Windows regression that was introduced in the last
release, where programs that need a lot of thread_local storage would
crash very early during initialization. See e437bed for details.

Newly discovered issues in Cosmo's POSIX threads runtime have been
addressed. It's now possible to cancel a thread that was created by a
canceled thread. Keys now destruct atomically within a thread, out of an
abundance of paranoia w.r.t. signal safety. Thread destructor function
names are also now logged to --strace. It's a boon for debuggability.
See 7695798 for further details.

We invented a new non-POSIX API named pthread_decimate_np() which forces
the runtime to garbage collect zombie threads. It can be used alongside
pthread_orphan_np() to block until detached threads have exited, so it's
safe to CheckForMemoryLeaks(). See 4cb5e21 for further details.

We've also added more preliminary content to the Cosmopolitan Templates
Library, which is an STL replacement that has 10x faster build times.

  • 98e6846 Add iostream to CTL
  • 44191b3 Add more type traits to CTL
  • 387310c Fix issue with ctl::vector constructor

Cosmopolitan v3.5.2

29 Jun 18:09
617ddfe
Compare
Choose a tag to compare
  • 464858d Fix bugs with new memory manager
  • 6de12c1 Upgrade to superconfigure z0.0.44
  • 021c53b Add more CTL content
  • 38921dc Introduce more CTL content
  • 054da02 ctl::string benchmarking code (#1200)
  • 1996620 Make std::random_device use getentropy()

Cosmopolitan v3.5.1

24 Jun 14:00
572ac7d
Compare
Choose a tag to compare
  • d461c6f Do more quality assurance work

Cosmopolitan v3.5.0

24 Jun 06:42
67b19ae
Compare
Choose a tag to compare

Cosmopolitan Libc makes C a build-once run-anywhere language, like Java, except it doesn't need an interpreter or virtual machine. Instead, it reconfigures stock GCC and Clang to output a POSIX-approved polyglot format that runs natively on Linux + Mac + Windows + FreeBSD + OpenBSD + NetBSD + BIOS with the best possible performance and the tiniest footprint imaginable. For further details, read Cosmopolitan Third Edition, the Cosmo README, and the Cosmopolitan Toolchain README.

Improvements

We now have a higher quality memory map implementation.

We've made a lot of progress reinventing the C++ STL.

We've been making improvements to our GitHub development process.

Cosmopolitan v3.4.0

05 Jun 10:54
3093f0e
Compare
Choose a tag to compare

Cosmopolitan Libc makes C a build-once run-anywhere language, like Java, except it doesn't need an interpreter or virtual machine. Instead, it reconfigures stock GCC and Clang to output a POSIX-approved polyglot format that runs natively on Linux + Mac + Windows + FreeBSD + OpenBSD + NetBSD + BIOS with the best possible performance and the tiniest footprint imaginable. For further details, read Cosmopolitan Third Edition, the Cosmo README, and the Cosmopolitan Toolchain README.

Improvements

This release makes dlmalloc scalable and zlib crc32 faster. Enterprise
server applications that employ many threads on many cores can now
look upon Cosmopolitan as a serious and viable option for their needs.

  • 3609f65 Make malloc() go 200x faster
  • a05ce3a Support avx512f + vpclmulqdq crc32() acceleration

This release fixes some showstopper issues on Windows.

  • e4d25d6 Drop support for Windows 8
  • cd672e2 Improve crash signal reporting on Windows
  • f31a98d Fix bug with realpath() on Windows
  • 2816df5 Increase tinymalloc granularity

This release brings a more modern standard library for C++. It compiles
slower, but in certain cases that can be worked around since it defines
"breakout" headers for individual functions, e.g. std::move(). Since it
goes so slow, we're experimenting with creating our own STL replacement

Our --ftrace function call logger now demangles C++ symbols. This is
thanks to revisions we've made to our FreeBSD demangler that makes it
lockless and reentrant so it's safe to call from signal handlers. It's not as
good as the libcxxabi demangler, but that doesn't make it unimpressive.
For example, calling kprintf("%t", sym) successfully demangles 90% of
the symbols in the llamafile codebase. Usually when it doesn't work, it's
because a symbol is very very long. Since it's run when nops are hooked
in function prologues, it has to be part of the privileged cosmo runtime,
which is highly constrained and can only use fixed size stack buffers.

Additional improvements:

  • 7c8df05 Improve -march=native micro-architecture detection
  • b74b974 Introduce #include <tinygetopt.h>
  • 4c77acd Add LoadZipArgs() to <cosmo.h>
  • fae1c32 Encode ±INFINITY as ±1e5000

Finally, this release sunsets the cosmopolitan amalgamation.

Cosmopolitan v3.3.10

27 May 05:20
2f4ca71
Compare
Choose a tag to compare
  • 07004eb Upgrade to superconfigure z0.0.42
  • 086d700 Improve crash handler on XNU
  • 0a51241 ntspawn: fix initializing NtStartupInfoEx (#1190)
  • c68f659 Fix definition of getpeername on FreeBSD
  • af3f62a Ensure io requests are always capped at 0x7ffff000

Cosmopolitan v3.3.9

26 May 22:36
6cf9b9e
Compare
Choose a tag to compare
  • c2db3b7 Introduce --timelog=FILE flag to GNU Make
  • edb03b8 Make stdin unbuffered when appropriate