mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-05 21:38:40 +00:00
sketch out ptr graph building data structures
This commit is contained in:
@@ -191,6 +191,13 @@ ptg_builder_thread__entry_point(void *p)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//- rjf: do task
|
||||||
|
if(got_task)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//- rjf: commit results to cache
|
//- rjf: commit results to cache
|
||||||
if(got_task) OS_MutexScopeW(stripe->rw_mutex)
|
if(got_task) OS_MutexScopeW(stripe->rw_mutex)
|
||||||
{
|
{
|
||||||
@@ -255,8 +262,7 @@ ptg_evictor_thread__entry_point(void *p)
|
|||||||
n->is_working == 0)
|
n->is_working == 0)
|
||||||
{
|
{
|
||||||
DLLRemove(slot->first, slot->last, n);
|
DLLRemove(slot->first, slot->last, n);
|
||||||
arena_clear(n->node_arena);
|
arena_clear(n->arena);
|
||||||
arena_clear(n->link_arena);
|
|
||||||
SLLStackPush(stripe->free_node, n);
|
SLLStackPush(stripe->free_node, n);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,13 +31,61 @@ struct PTG_Link
|
|||||||
U32 to;
|
U32 to;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
typedef struct PTG_NodeChunkNode PTG_NodeChunkNode;
|
||||||
|
struct PTG_NodeChunkNode
|
||||||
|
{
|
||||||
|
PTG_NodeChunkNode *next;
|
||||||
|
PTG_Node *v;
|
||||||
|
U64 count;
|
||||||
|
U64 cap;
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef struct PTG_NodeChunkList PTG_NodeChunkList;
|
||||||
|
struct PTG_NodeChunkList
|
||||||
|
{
|
||||||
|
PTG_NodeChunkNode *first;
|
||||||
|
PTG_NodeChunkNode *last;
|
||||||
|
U64 chunk_count;
|
||||||
|
U64 total_count;
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef struct PTG_NodeArray PTG_NodeArray;
|
||||||
|
struct PTG_NodeArray
|
||||||
|
{
|
||||||
|
PTG_Node *v;
|
||||||
|
U64 count;
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef struct PTG_LinkChunkNode PTG_LinkChunkNode;
|
||||||
|
struct PTG_LinkChunkNode
|
||||||
|
{
|
||||||
|
PTG_LinkChunkNode *next;
|
||||||
|
PTG_Link *v;
|
||||||
|
U64 count;
|
||||||
|
U64 cap;
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef struct PTG_LinkChunkList PTG_LinkChunkList;
|
||||||
|
struct PTG_LinkChunkList
|
||||||
|
{
|
||||||
|
PTG_LinkChunkNode *first;
|
||||||
|
PTG_LinkChunkNode *last;
|
||||||
|
U64 chunk_count;
|
||||||
|
U64 total_count;
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef struct PTG_LinkArray PTG_LinkArray;
|
||||||
|
struct PTG_LinkArray
|
||||||
|
{
|
||||||
|
PTG_Link *v;
|
||||||
|
U64 count;
|
||||||
|
};
|
||||||
|
|
||||||
typedef struct PTG_Graph PTG_Graph;
|
typedef struct PTG_Graph PTG_Graph;
|
||||||
struct PTG_Graph
|
struct PTG_Graph
|
||||||
{
|
{
|
||||||
PTG_Node *nodes;
|
PTG_NodeArray nodes;
|
||||||
U64 nodes_count;
|
PTG_LinkArray links;
|
||||||
PTG_Link *links;
|
|
||||||
U64 links_count;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct PTG_GraphNode PTG_GraphNode;
|
typedef struct PTG_GraphNode PTG_GraphNode;
|
||||||
@@ -58,8 +106,7 @@ struct PTG_GraphNode
|
|||||||
B32 is_working;
|
B32 is_working;
|
||||||
|
|
||||||
// rjf: content
|
// rjf: content
|
||||||
Arena *node_arena;
|
Arena *arena;
|
||||||
Arena *link_arena;
|
|
||||||
PTG_Graph graph;
|
PTG_Graph graph;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user