home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / sys / amiga / applicat / 6221 < prev    next >
Encoding:
Text File  |  1992-07-27  |  1.2 KB  |  49 lines

  1. Newsgroups: comp.sys.amiga.applications
  2. Path: sparky!uunet!cs.utexas.edu!usc!rpi!newsserver.pixel.kodak.com!jeh
  3. From: jeh@raster.kodak.com (Ed Hanway)
  4. Subject: Re: Virtual Memory for the Amiga?
  5. Message-ID: <1992Jul27.123455.8577@pixel.kodak.com>
  6. Sender: news@pixel.kodak.com
  7. Organization: Eastman Kodak Company, Digital Systems Center
  8. X-Newsreader: Tin 1.1 PL3
  9. References: <1992Jul27.101544.3547@mpifr-bonn.mpg.de>
  10. Date: Mon, 27 Jul 92 12:34:55 GMT
  11. Lines: 36
  12.  
  13. Would someone with this virtual memory system care to try the following
  14. program?
  15.  
  16. #include <exec/types.h>
  17. #include <proto/exec.h>
  18. #include <stdio.h>
  19.  
  20. #define TESTBUFSIZE    (100000000L)
  21. #define    TRIALS        (1000)
  22. #define BLOCKS        (TESTBUFSIZE/TRIALS)
  23. #define BLOCKSIZE    (TRIALS)
  24.  
  25. main(void)
  26. {
  27.     volatile char *buf;
  28.     int i;
  29.  
  30.     if(buf = (volatile char *) AllocMem(TESTBUFSIZE, 0L)) {
  31.  
  32.         for(i = 0; i < TRIALS; i++) {
  33.             long addr = (rand() % BLOCKS) * BLOCKSIZE;
  34.  
  35.             Disable();
  36.             buf[addr]++;
  37.             Enable();
  38.         }
  39.         FreeMem(buf, TESTBUFSIZE);
  40.     } else {
  41.         fprintf(stderr, "No test\n");
  42.     }
  43. }
  44.  
  45. --
  46. Ed Hanway --- jeh@raster.kodak.com
  47. This message is packed as full as practicable by modern automated equipment.
  48. Contents may settle during shipment.
  49.