Fix things building on linux again.

git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4486 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
2023-10-04 23:38:42 +00:00
parent 31af27529e
commit ec83f9c747
2 changed files with 26 additions and 12 deletions

View File

@ -202,7 +202,10 @@ tf_mem_allocation_t* tf_mem_summarize_allocations(int* out_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);
memcpy(result, summary.allocations, sizeof(tf_mem_allocation_t) * summary.count);
if (result)
{
memcpy(result, summary.allocations, sizeof(tf_mem_allocation_t) * summary.count);
}
free(summary.allocations);
return result;
}