mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-30 08:18:30 +00:00
Introduce libc/mem/tinymalloc.inc
This allocator shaves ~20kb off single-threaded tool programs and is slightly faster than proper malloc for simple non-demanding programs
This commit is contained in:
parent
3bf95ae7ec
commit
a6ecbb747d
17 changed files with 201 additions and 37 deletions
|
@ -43,8 +43,6 @@
|
|||
#include "third_party/xed/x86.h"
|
||||
#include "tool/build/lib/getargs.h"
|
||||
|
||||
__static_yoink("realloc");
|
||||
|
||||
/**
|
||||
* @fileoverview Build Package Script.
|
||||
*
|
||||
|
@ -153,6 +151,8 @@ struct Relas {
|
|||
} *p;
|
||||
} prtu;
|
||||
|
||||
#include "libc/mem/tinymalloc.inc"
|
||||
|
||||
static wontreturn void Die(const char *path, const char *reason) {
|
||||
tinyprint(2, path, ": ", reason, "\n", NULL);
|
||||
exit(1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue