Delete more dead code

This commit is contained in:
Justine Tunney 2023-07-06 09:07:42 -07:00
parent 0a24b4fc3c
commit 00acd81b2f
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
63 changed files with 75 additions and 1220 deletions

View file

@ -16,7 +16,6 @@
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
*/
#include "libc/linux/mmap.h"
#include "ape/sections.internal.h"
#include "libc/calls/calls.h"
#include "libc/calls/ucontext.h"
@ -28,7 +27,6 @@
#include "libc/intrin/kprintf.h"
#include "libc/intrin/safemacros.internal.h"
#include "libc/intrin/xchg.internal.h"
#include "libc/linux/munmap.h"
#include "libc/log/log.h"
#include "libc/mem/gc.h"
#include "libc/mem/mem.h"
@ -461,22 +459,3 @@ BENCH(mmap, bench) {
EZBENCH2("mmap", donothing, BenchMmapPrivate());
EZBENCH2("munmap", donothing, BenchUnmap());
}
void BenchUnmapLinux(void) {
ASSERT_EQ(0, LinuxMunmap(ptrs[count++], FRAMESIZE));
}
void BenchMmapPrivateLinux(void) {
void *p;
p = (void *)LinuxMmap(0, FRAMESIZE, PROT_READ | PROT_WRITE,
MAP_ANONYMOUS | MAP_PRIVATE, -1, 0);
if (p == MAP_FAILED) abort();
ptrs[count++] = p;
}
BENCH(mmap, benchLinux) {
void *p;
if (!IsLinux()) return;
EZBENCH2("mmap (linux)", donothing, BenchMmapPrivateLinux());
EZBENCH2("munmap (linux)", donothing, BenchUnmapLinux());
}