Skip to content

Instantly share code, notes, and snippets.

View jandem's full-sized avatar

Jan de Mooij jandem

  • Mozilla
  • Netherlands
View GitHub Profile
@jandem
jandem / test_madvise.cpp
Last active July 1, 2026 06:45
Stress test for MADV_FREE_REUSABLE / MADV_FREE_REUSE
#include <pthread.h>
#include <sys/mman.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <stdatomic.h>
#include <errno.h>
#include <stdint.h>
#include <sched.h>
@jandem
jandem / test.cpp
Last active May 2, 2025 11:44
Test for fjcvtzs and denormals on Mac
// Instructions:
//
// Download as test.cpp, then compile and run it:
//
// $ clang++ -O3 test.cpp -o test && ./test
//
// Output on M1: zero flag: 1, result: 0 (Jan)
// Output on M4: zero flag: 0, result: 0 (Matt)
#include <cstdint>
@jandem
jandem / keybase.md
Created September 14, 2020 11:19
keybase.md

Keybase proof

I hereby claim:

  • I am jandem on github.
  • I am jandem (https://keybase.io/jandem) on keybase.
  • I have a public key ASCZT0cL6jJrELh7lYaExUWSKiZyayKj8zgWihjpAIGgYAo

To claim this, I am signing this object: