Move /trace and /mem to C.

git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4724 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
2024-01-02 15:43:17 +00:00
parent 9ef909c9a1
commit 709b57d84f
4 changed files with 70 additions and 50 deletions

View File

@ -199,7 +199,10 @@ tf_mem_allocation_t* tf_mem_summarize_allocations(int* out_count)
{
summary_t summary = { 0 };
tf_mem_walk_allocations(_tf_mem_summarize, &summary);
qsort(summary.allocations, summary.count, sizeof(tf_mem_allocation_t), _tf_mem_size_compare);
if (summary.count)
{
qsort(summary.allocations, summary.count, sizeof(tf_mem_allocation_t), _tf_mem_size_compare);
}
*out_count = summary.count;
tf_mem_allocation_t* result = tf_malloc(sizeof(tf_mem_allocation_t) * summary.count);
if (result)