Skip to content

Instantly share code, notes, and snippets.

@brentspell
brentspell / pool.c
Last active July 5, 2024 16:01
Fast Efficient Fixed-Size Memory Pool: No Loops and No Overhead
// https://arxiv.org/abs/2210.16471v1
#include <stdint.h>
#include <stdlib.h>
typedef struct {
uint8_t* data;
uint8_t* head;
uint8_t* last;
size_t unit;

Keybase proof

I hereby claim:

  • I am brentspell on github.
  • I am brentspell (https://keybase.io/brentspell) on keybase.
  • I have a public key whose fingerprint is F420 C40E E3ED A1B0 0F26 9303 C19F 01B6 8713 F920

To claim this, I am signing this object: