Добавил:
Studfiles2
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз:
Предмет:
Файл:Лабораторная работа №21 / TEST
.C#include "H.C"
#include <conio.h>
void main()
{
ListElement *p1,*p2;
int i,*pi,j;
long l,*pl;
short s,*ps;
char c,*pc;
double d,*pd;
for (j=0;j<25;j++)
printf("\r\n");
printf("addr bytes\r\n");
printf("\r\n**Initializing memory list**");
getch();
INIT();
printList();
getch();
printf("\r\n**take memory for int i**");
getch();
pi=newALLOC(sizeof(i));
printList();
printf("\r\n**take memory for long l**");
getch();
pl=newALLOC(sizeof(l));
printList();
printf("\r\n**take memory for short s**");
getch();
ps=newALLOC(sizeof(s));
printList();
printf("\r\n**take memory for double d**");
getch();
pd=newALLOC(sizeof(d));
printList();
printf("\r\n**free memory from long l**");
getch();
newFREE(pl,sizeof(l));
printList();
printf("\r\n**free memory from short s**");
getch();
newFREE(ps,sizeof(s));
printList();
printf("\r\n**free memory from double d**");
getch();
newFREE(pd,sizeof(d));
printList();
printf("\r\n**free memory from int i**");
getch();
newFREE(pi,sizeof(i));
printList();
getch();
free(pFreeMemory);
}