diff options
| author | Quentin LADEVIE <qladevie@wanadev.fr> | 2025-04-30 00:17:19 +0200 |
|---|---|---|
| committer | Quentin LADEVIE <qladevie@wanadev.fr> | 2025-04-30 00:17:19 +0200 |
| commit | 0ad788465c7505bdadff64c2f3af3ad5edf71cc3 (patch) | |
| tree | 96bbcf64de7bd2ee7c99ad9a133182ea62a1db0e /include/hashmap.h | |
| parent | f8c92cfa9eeb82a608d409cac70d9d2533ab79d8 (diff) | |
Compiles files one by one
Diffstat (limited to 'include/hashmap.h')
| -rw-r--r-- | include/hashmap.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/include/hashmap.h b/include/hashmap.h new file mode 100644 index 0000000..88490e7 --- /dev/null +++ b/include/hashmap.h @@ -0,0 +1,26 @@ +#pragma once + +#include "types.h" + +struct element { + u64 name; + u32 start; + u32 end; + u32 unwind_offset; + u32 psl; +}; + +struct hashmap { + u32 capacity; + u32 size; + + struct element* arr; +}; + +extern struct hashmap create_unordered_flat(); + +extern struct element* insert_elem(struct hashmap* map, u32 start, u32 end, u64 name); + +extern struct element* find_elem(struct hashmap* map, u32 start); + +extern void iterate(struct hashmap* map); |
