[ create a new paste ] login | about

Link: http://codepad.org/sUyWce3z    [ raw code | fork ]

faay - C, pasted on Nov 17:
#include <stdio.h>
#include <stdlib.h>
#include "MemRoutines.h"
#include "TagTable.h"


int main (void)
{
	char *t1,*t2,*t3,*t4,*t5,*t6,*t7,*t8,*t9;
	t1 = mymalloc(4000);
	t9 = malloc(125); /*Original Malloc*/
	t2 = mymalloc(5000);
	myfree(t1);
	myfree(NULL); 
	myfree(t9); /*Wild Pointer*/
	t3 = mycalloc(25,sizeof(double));/*Calloc*/
	t4 = mymalloc(5*1024*1024); 
	t5 = mycalloc(25,sizeof(int));/*Calloc*/
	t6 = mymalloc(5600);
	myfree(t2);
	t7 = mymalloc(0);
	t8 = mymalloc(3*1024*1024);
	myfree(t3);
	myfree(t4);
	myfree(t6);
	myfree(t5);
	myfree(t8);
	myfree(t7);
	
	debugMemoryUsage();
	
	return EXIT_SUCCESS;
}


Create a new paste based on this one


Comments: