Implemented IsTraceFinished, removed global linked list
This commit is contained in:
parent
c6ff6ad31d
commit
d3722aac83
2 changed files with 16 additions and 13 deletions
|
@ -4,6 +4,7 @@
|
|||
#include "../allocator-interface/allocator-interface.h"
|
||||
|
||||
#include <stdalign.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
enum TracingColor {
|
||||
TRACINGCOLOR_BLACK,
|
||||
|
@ -12,8 +13,6 @@ enum TracingColor {
|
|||
};
|
||||
|
||||
typedef struct TracingObject {
|
||||
struct TracingObject* global_next;
|
||||
struct TracingObject* global_prev;
|
||||
struct TracingObject* color_next;
|
||||
struct TracingObject* color_prev;
|
||||
enum TracingColor color;
|
||||
|
@ -39,7 +38,6 @@ typedef struct TracingHeapConfig_s {
|
|||
} TracingHeapConfig;
|
||||
|
||||
typedef struct TracingHeap_s {
|
||||
TracingObject* objects;
|
||||
TracingObject* white_objects;
|
||||
TracingObject* grey_objects;
|
||||
TracingObject* black_objects;
|
||||
|
@ -57,6 +55,7 @@ void TracingHeap_Destroy(TracingHeap* self);
|
|||
void* TracingHeap_Allocate(TracingHeap* self, size_t bytes);
|
||||
|
||||
int TracingHeap_BeginTrace(TracingHeap* self);
|
||||
bool TracingHeap_IsTraceFinished(TracingHeap* self);
|
||||
int TracingHeap_EndTrace(TracingHeap* self);
|
||||
int TracingHeap_TraceNext(TracingHeap* self);
|
||||
size_t TracingHeap_TraceNextN(TracingHeap* self, size_t n);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue