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.10 by gbeauche, 2003-11-24T23:27:18Z vs.
Revision 1.11 by gbeauche, 2003-12-20T21:44:52Z

# Line 138 | Line 138 | void * vm_acquire(size_t size, int optio
138   #ifdef HAVE_MMAP_VM
139          const int extra_map_flags = translate_map_flags(options);
140  
141 <        if ((addr = mmap((caddr_t)next_address, size, VM_PAGE_DEFAULT, extra_map_flags | map_flags, zero_fd, 0)) == MAP_FAILED)
141 >        if ((addr = mmap((caddr_t)next_address, size, VM_PAGE_DEFAULT, extra_map_flags | map_flags, zero_fd, 0)) == (void *)MAP_FAILED)
142                  return VM_MAP_FAILED;
143          
144          // Sanity checks for 64-bit platforms
# Line 184 | Line 184 | int vm_acquire_fixed(void * addr, size_t
184   #ifdef HAVE_MMAP_VM
185          const int extra_map_flags = translate_map_flags(options);
186  
187 <        if (mmap((caddr_t)addr, size, VM_PAGE_DEFAULT, extra_map_flags | map_flags | MAP_FIXED, zero_fd, 0) == MAP_FAILED)
187 >        if (mmap((caddr_t)addr, size, VM_PAGE_DEFAULT, extra_map_flags | map_flags | MAP_FIXED, zero_fd, 0) == (void *)MAP_FAILED)
188                  return -1;
189          
190          // Since I don't know the standard behavior of mmap(), zero-fill here

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines