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

Comparing BasiliskII/src/Unix/vm_alloc.cpp (file contents):
Revision 1.5 by cebix, 2002-01-15T14:58:37Z vs.
Revision 1.6 by gbeauche, 2002-02-11T14:28:02Z

# Line 136 | Line 136 | int vm_acquire_fixed(void * addr, size_t
136                  return -1;
137          
138          // Since I don't know the standard behavior of mmap(), zero-fill here
139 <        if (memset(0, 0, size) != 0)
139 >        if (memset(addr, 0, size) != 0)
140                  return -1;
141   #else
142          // Unsupported
# Line 146 | Line 146 | int vm_acquire_fixed(void * addr, size_t
146          
147          // Explicitely protect the newly mapped region here because on some systems,
148          // say MacOS X, mmap() doesn't honour the requested protection flags.
149 <        if (vm_protect(0, size, VM_PAGE_DEFAULT) != 0)
149 >        if (vm_protect(addr, size, VM_PAGE_DEFAULT) != 0)
150                  return -1;
151          
152          return 0;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines