Changeset 2508 for trunk/src/win32k/misc/heaptest.c
- Timestamp:
- Jan 24, 2000, 4:05:14 AM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/win32k/misc/heaptest.c
r2507 r2508 1 /* $Id: heaptest.c,v 1. 3 2000-01-24 01:45:20bird Exp $1 /* $Id: heaptest.c,v 1.4 2000-01-24 03:05:13 bird Exp $ 2 2 * 3 3 * Test of resident and swappable heaps. … … 47 47 int fResRandom = 0; 48 48 int fSwpTests = 1; 49 int fSwpSimple = 1;49 int fSwpSimple = 0; 50 50 int fSwpRandom = 1; 51 enum {malloc,realloc, free, unknown} enmLast = unknown; 51 52 52 53 /* … … 90 91 acb[i] += 1024*260; 91 92 apv[i] = rmalloc(acb[i]); 93 enmLast = malloc; 92 94 if (apv[i] == NULL) 93 95 { … … 112 114 printf("size of avp[%d] (%d) != acb[%d] (%d)\n", i, cb, i, acb[i]); 113 115 rfree(apv[i]); 116 enmLast = free; 114 117 } 115 118 … … 168 171 acb[j] += 1024*256; 169 172 apv[j] = rmalloc(acb[j]); 173 enmLast = malloc; 170 174 if (apv[j] == NULL) 171 175 { … … 224 228 */ 225 229 pv = rrealloc(apv[j], cb); 230 enmLast = realloc; 226 231 if (pv == NULL) 227 232 { … … 235 240 { /* free */ 236 241 rfree(apv[j]); 242 enmLast = free; 237 243 apv[j] = NULL; 238 244 cAllocations--; … … 286 292 acb[i] += 1024*260; 287 293 apv[i] = smalloc(acb[i]); 294 enmLast = malloc; 288 295 if (apv[i] == NULL) 289 296 { … … 308 315 printf("size of avp[%d] (%d) != acb[%d] (%d)\n", i, cb, i, acb[i]); 309 316 sfree(apv[i]); 317 enmLast = free; 310 318 } 311 319 … … 364 372 acb[j] += 1024*256; 365 373 apv[j] = smalloc(acb[j]); 374 enmLast = malloc; 366 375 if (apv[j] == NULL) 367 376 { … … 420 429 */ 421 430 pv = srealloc(apv[j], cb); 431 enmLast = realloc; 422 432 if (pv == NULL) 423 433 { … … 431 441 { /* free */ 432 442 sfree(apv[j]); 443 enmLast = free; 433 444 apv[j] = NULL; 434 445 cAllocations--;
Note:
See TracChangeset
for help on using the changeset viewer.