diff options
| author | Jonathan Bradley <jcb@pikum.xyz> | 2023-10-06 12:56:19 -0400 |
|---|---|---|
| committer | Jonathan Bradley <jcb@pikum.xyz> | 2023-10-06 12:59:23 -0400 |
| commit | 69e6672e36e6ea377cd6d1bb1d93c260f292063b (patch) | |
| tree | ea9ccde939b38e1d3d787ec91a74036de370d3b6 /src/memory.cpp | |
| parent | 7c15e824842ca4fd8c6279b805ba41f788693ebe (diff) | |
debug print memory buckets on shutdown
Diffstat (limited to 'src/memory.cpp')
| -rw-r--r-- | src/memory.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/memory.cpp b/src/memory.cpp index ee99fc8..87d5eca 100644 --- a/src/memory.cpp +++ b/src/memory.cpp @@ -123,3 +123,16 @@ uint64_t Buckets_NewHandle(std::size_t bucketBytes, uint64_t bucketItemCount, ui return newHandle; } + +void Pke_DebugPrint() { + printf("Memory Manager printout:\nBucket count: %li\n", bucketHead + 1); + for (long i = 0; i < bucketHead + 1; ++i) { + printf("- bucket #%li\n", i); + printf("\tsize: %li\n", buckets[i].size); + printf("\thead: %li\n", buckets[i].head); + printf("\tfree: %li\n", buckets[i].free); + printf("\tallocs: %li\n", buckets[i].allocs); + printf("\ttransient: %i\n", buckets[i].transient); + printf("\tptr: %p\n", buckets[i].ptr); + } +} |
