-
Notifications
You must be signed in to change notification settings - Fork 2
art4711/stuff
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This is stuff. Some of it does things. Mostly just personal backup, but hey if it's useful for you the files have licenses, knock yourself out. If the files don't have licenses poke me and I'll fix that. alloca_games/ - Did you know that alloca() and variable length arrays shouldn't be mixed when using gcc (and maybe others)? This tests what happens when you do. avl/ - Ted Unangst wrote an avl tree implementation that never got used for whatever he wrote it for. I beat it up to make it smaller and faster and added an iterator to it. flippedarray/ - Experiment to simulate the cache behavior of binary searching in an array when we apply a function to the array index. The theory is that if we reverse bits in the index (let's say the array has 2^5 elements, the index 10100 would be mapped to 00101) the first few elements visited will be the first few elements of the array and thus always in the cache. The simulation looks promising, but this is completely unfinished. heap/ - Binary heap with in-struct linkage along the same principles as sys/tree.h in OpenBSD. hello_elf_amd64_linux/ - Experiement to see how small a proper hello world can be in a binary that runs on linux amd64 (ELF). 112 bytes. Considering that you need 120 bytes of headers for an ELF binary with one load section, I'd say it can't be reduced anymore. linker_set/ - FreeBSD style linker sets. lock_recursion_is_bad/ - Favourite example for why lazily making your locks recursive is a bad idea. This is a bug that was present in many unix-like systems many years ago that made the filesystem leak uninitialized data. At the moment of writing this it will deadlock the process on macos and after a reboot the file will contain stuff from uninitialized memory (technically it contains unitialized memory before the reboot, but I haven't found a way to read it without deadlocking). totiming/ - Experiments for measuring performance of different kern_timeout implementations.
About
Small stuff
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published