mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-27 23:08:31 +00:00
Make mappings unlimited on NT
This change might also fix fork() in certain cases on NT.
This commit is contained in:
parent
ab64c746cc
commit
34b68f1945
31 changed files with 356 additions and 127 deletions
|
@ -23,6 +23,7 @@
|
|||
#include "libc/runtime/runtime.h"
|
||||
#include "libc/stdio/stdio.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "libc/testlib/ezbench.h"
|
||||
#include "libc/testlib/testlib.h"
|
||||
#include "libc/x/x.h"
|
||||
|
||||
|
@ -73,3 +74,22 @@ TEST(gclongjmp, test) {
|
|||
free(y);
|
||||
free(x);
|
||||
}
|
||||
|
||||
void F1(void) {
|
||||
/* 3x slower than F2() but sooo worth it */
|
||||
_gc(malloc(16));
|
||||
}
|
||||
|
||||
void F2(void) {
|
||||
void *volatile p;
|
||||
p = malloc(16);
|
||||
free(p);
|
||||
}
|
||||
|
||||
void (*F1p)(void) = F1;
|
||||
void (*F2p)(void) = F2;
|
||||
|
||||
BENCH(gc, bench) {
|
||||
EZBENCH2("gc(malloc(16))", donothing, F1p());
|
||||
EZBENCH2("free(malloc(16))", donothing, F2p());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue