home *** CD-ROM | disk | FTP | other *** search
/ Gold Fish 1 / GoldFishApril1994_CD1.img / d1xx / d113 / dosdev / flush.c < prev    next >
C/C++ Source or Header  |  1987-11-21  |  302b  |  20 lines

  1.  
  2. /*
  3.  *  Allocate memory until we can't ... force the system to flush all
  4.  *  non-active DOS devices, libraries, fonts, etc....
  5.  */
  6.  
  7. extern void *AllocMem();
  8.  
  9. main()
  10. {
  11.     char *ptr;
  12.     long bytes = 1 << 9;
  13.  
  14.     while (ptr = AllocMem(bytes, MEMF_PUBLIC)) {
  15.     FreeMem(ptr, bytes);
  16.     bytes <<= 1;
  17.     }
  18. }
  19.  
  20.