diff --git a/src/TracingHeap/TracingHeap.c b/src/TracingHeap/TracingHeap.c index 5be63b8..2be2aa1 100644 --- a/src/TracingHeap/TracingHeap.c +++ b/src/TracingHeap/TracingHeap.c @@ -131,6 +131,14 @@ int TracingHeap_AddTracingRoot(TracingHeap* self, void* data) return EXIT_SUCCESS; } +enum TracingColor TracingHeap_GetDataColor(TracingHeap* self, void* data) +{ + (void) self; + TracingObject* root_object = _TracingObject_FromDataPointer(data); + + return root_object->color; +} + int TracingHeap_TraceNext(TracingHeap* self) { if (self == NULL) { diff --git a/src/TracingHeap/TracingHeap.h b/src/TracingHeap/TracingHeap.h index cfe4c60..77d19ec 100644 --- a/src/TracingHeap/TracingHeap.h +++ b/src/TracingHeap/TracingHeap.h @@ -61,5 +61,6 @@ int TracingHeap_EndTrace(TracingHeap* self); int TracingHeap_TraceNext(TracingHeap* self); size_t TracingHeap_TraceNextN(TracingHeap* self, size_t n, int* error_code); int TracingHeap_AddTracingRoot(TracingHeap* self, void* data); +enum TracingColor TracingHeap_GetDataColor(TracingHeap* self, void* data); #endif // header