home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 15 / CD_ASCQ_15_070894.iso / vrac / borlan32.zip / TEST32.C < prev    next >
C/C++ Source or Header  |  1994-05-09  |  381b  |  29 lines

  1.  
  2.  
  3.  
  4. #include <stdio.h>
  5. #include <stdlib.h>
  6. #include <malloc.h>
  7.  
  8. void helloworld(void);
  9.  
  10. void main(void)
  11. {
  12.  
  13.     char *tbuff;
  14.  
  15.     tbuff = malloc(0x100000);        // allocate 1 mega byte
  16.     if (tbuff == NULL)
  17.         {
  18.         printf("Unable to allocate 1 megabyte of memory\n");
  19.         exit(1);
  20.         }
  21.  
  22.     printf("Hello World! I allocated 1 megabyte at $%lx\n", tbuff);
  23.  
  24.     free(tbuff);
  25.  
  26.  
  27. }
  28.  
  29.