Skip to content

Instantly share code, notes, and snippets.

View Firevvork's full-sized avatar
🥰

lr Firevvork

🥰
View GitHub Profile
@cloudwu
cloudwu / handle.c
Last active November 14, 2024 04:21
Unique handle
#include "handle.h"
#include <stdlib.h>
#include <assert.h>
#include <string.h>
#define HANDLE_USED 0x80000000
size_t
handle_size(int bits) {
int n = 1 << bits;