home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.amiga.applications
- Path: sparky!uunet!cs.utexas.edu!usc!rpi!newsserver.pixel.kodak.com!jeh
- From: jeh@raster.kodak.com (Ed Hanway)
- Subject: Re: Virtual Memory for the Amiga?
- Message-ID: <1992Jul27.123455.8577@pixel.kodak.com>
- Sender: news@pixel.kodak.com
- Organization: Eastman Kodak Company, Digital Systems Center
- X-Newsreader: Tin 1.1 PL3
- References: <1992Jul27.101544.3547@mpifr-bonn.mpg.de>
- Date: Mon, 27 Jul 92 12:34:55 GMT
- Lines: 36
-
- Would someone with this virtual memory system care to try the following
- program?
-
- #include <exec/types.h>
- #include <proto/exec.h>
- #include <stdio.h>
-
- #define TESTBUFSIZE (100000000L)
- #define TRIALS (1000)
- #define BLOCKS (TESTBUFSIZE/TRIALS)
- #define BLOCKSIZE (TRIALS)
-
- main(void)
- {
- volatile char *buf;
- int i;
-
- if(buf = (volatile char *) AllocMem(TESTBUFSIZE, 0L)) {
-
- for(i = 0; i < TRIALS; i++) {
- long addr = (rand() % BLOCKS) * BLOCKSIZE;
-
- Disable();
- buf[addr]++;
- Enable();
- }
- FreeMem(buf, TESTBUFSIZE);
- } else {
- fprintf(stderr, "No test\n");
- }
- }
-
- --
- Ed Hanway --- jeh@raster.kodak.com
- This message is packed as full as practicable by modern automated equipment.
- Contents may settle during shipment.
-