cs252/lab1-src/test1.c

20 lines
334 B
C
Raw Normal View History

2018-10-25 14:45:56 -04:00
#include <stdlib.h>
#include <stdio.h>
#include "MyMalloc.h"
int allocations = 65535;
int main() {
printf("\n---- Running test1 ---\n");
//test performs many small allocations, up to 2MB
int i;
for ( i = 0; i < allocations; i++ ) {
char * p1 = (char *) malloc(15 );
*p1 = 100;
}
print_list();
exit( 0 );
}