ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/Unix/Darwin/lowmem.c
(Generate patch)

Comparing BasiliskII/src/Unix/Darwin/lowmem.c (file contents):
Revision 1.6 by asvitkine, 2009-11-13T01:57:48Z vs.
Revision 1.8 by asvitkine, 2011-12-27T20:50:27Z

# Line 106 | Line 106 | void pagezero_64(struct mach_header_64 *
106   #endif
107  
108   /*
109 /*
109   * Under Mach there is very little assumed about the memory map of object
110   * files. It is the job of the loader to create the initial memory map of an
111   * executable. In a Mach-O executable there will be numerous loader commands
# Line 167 | Line 166 | main(int argc, const char *argv[])
166           */
167          addr = mmap(NULL, file_size, PROT_READ | PROT_WRITE,
168              MAP_FILE | MAP_SHARED, fd, 0);
169 <        if (addr == NULL) {
169 >        if (addr == NULL || addr == MAP_FAILED) {
170                  (void)fprintf(stderr, "%s: could not mmap %s: %s\n",
171                                  progname, filename, strerror(errno));
172                  exit(1);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines