mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-01 19:48:11 +00:00
switch to thread safe hash trie map
Initial implementation of the symbol table allowed us to push symbols from one thread at a time and required a wonky lock-step and spread out logic for replacing symbols. And because it was a externally chained hash table we had to guesstimate optimal capacity for small and big targets. We erred on the side of larger capacity to prevent degradation and rehashing, however this meant small targets had to spent unreasonable amount of time memory allocing slots. With hash trie we can dynamically scale up to 4 ^ 32 items and atomically replace symbols when needed. Neat!
This commit is contained in:
@@ -12,6 +12,7 @@ typedef struct LNK_Lib
|
||||
U32 * member_off_arr;
|
||||
String8List symbol_name_list;
|
||||
String8 long_names;
|
||||
U64 input_idx;
|
||||
} LNK_Lib;
|
||||
|
||||
typedef struct LNK_LibNode
|
||||
@@ -92,9 +93,10 @@ typedef struct LNK_LibBuild
|
||||
|
||||
typedef struct
|
||||
{
|
||||
LNK_LibNode *node_arr;
|
||||
String8 *data_arr;
|
||||
String8 *path_arr;
|
||||
LNK_LibNode *node_arr;
|
||||
String8 *data_arr;
|
||||
String8 *path_arr;
|
||||
U64 base_input_idx;
|
||||
} LNK_LibIniter;
|
||||
|
||||
////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user