Changeset 2030 in kBuild
- Timestamp:
- Nov 3, 2008 2:44:50 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kmk/misc.c
r1993 r2030 1342 1342 1343 1343 malloc_zone_statistics (NULL, &s); 1344 printf (_("\n# CRT Heap: %zu bytes in use, in %u block , avg %zu bytes/block\n"),1344 printf (_("\n# CRT Heap: %zu bytes in use, in %u blocks, avg %zu bytes/block\n"), 1345 1345 s.size_in_use, s.blocks_in_use, s.size_in_use / s.blocks_in_use); 1346 1346 printf (_("# %zu bytes max in use (high water mark)\n"), … … 1349 1349 s.size_allocated, s.size_allocated - s.size_in_use); 1350 1350 # endif /* __APPLE__ */ 1351 1352 /* MSC / Windows */ 1353 # ifdef _MSC_VER 1354 unsigned int blocks_used = 0; 1355 unsigned int bytes_used = 0; 1356 unsigned int blocks_avail = 0; 1357 unsigned int bytes_avail = 0; 1358 _HEAPINFO hinfo; 1359 1360 memset (&hinfo, '\0', sizeof (hinfo)); 1361 while (_heapwalk(&hinfo) == _HEAPOK) 1362 { 1363 if (hinfo._useflag == _USEDENTRY) 1364 { 1365 blocks_used++; 1366 bytes_used += hinfo._size; 1367 } 1368 else 1369 { 1370 blocks_avail++; 1371 bytes_avail += hinfo._size; 1372 } 1373 } 1374 1375 printf (_("\n# CRT Heap: %u bytes in use, in %u blocks, avg %u bytes/block\n"), 1376 bytes_used, blocks_used, bytes_used / blocks_used); 1377 printf (_("# %u bytes avail, in %u blocks, avg %u bytes/block\n"), 1378 bytes_avail, blocks_avail, bytes_avail / blocks_avail); 1379 # endif /* _MSC_VER */ 1351 1380 1352 1381 /* Darwin Libc sources indicates that something like this may be
Note:
See TracChangeset
for help on using the changeset viewer.