- printf("Socket:%u\n", socket);
- printf("\tHeap_size:%zu,\n", sock_stats.heap_totalsz_bytes);
- printf("\tFree_size:%zu,\n", sock_stats.heap_freesz_bytes);
- printf("\tAlloc_size:%zu,\n", sock_stats.heap_allocsz_bytes);
- printf("\tGreatest_free_size:%zu,\n",
+ fprintf(f, "Socket:%u\n", socket);
+ fprintf(f, "\tHeap_size:%zu,\n", sock_stats.heap_totalsz_bytes);
+ fprintf(f, "\tFree_size:%zu,\n", sock_stats.heap_freesz_bytes);
+ fprintf(f, "\tAlloc_size:%zu,\n", sock_stats.heap_allocsz_bytes);
+ fprintf(f, "\tGreatest_free_size:%zu,\n",