home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The C Users' Group Library 1994 August
/
wc-cdrom-cusersgrouplibrary-1994-08.iso
/
listings
/
v_03_02
/
3n02050a
< prev
next >
Wrap
Text File
|
1991-09-17
|
423b
|
22 lines
// memory.c example 1
// cl /AL /Lp memory.c
// bind286 memory
// memory
#include <stdlib.h>
#include <stdio.h>
main()
{
int i = 0;
printf("Allocating memory...\n");
while(1)
if (malloc((unsigned)65512))
printf("Allocated 64K: %d blocks\n",++i);
else
break;
printf("Ran out of available memory\n\n");
printf("Allocated %dK total.\n",i*64);
}