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.3 by gbeauche, 2001-07-07T09:07:38Z vs.
Revision 1.4 by gbeauche, 2001-07-14T18:41:05Z

# Line 162 | Line 162 | int vm_release(void * addr, size_t size)
162                  return 0;
163  
164   #ifdef HAVE_MACH_VM
165 <        int ret_code = vm_deallocate(mach_task_self(), (vm_address_t)addr, size);
166 <        return ret_code == KERN_SUCCESS ? 0 : -1;
165 >        if (vm_deallocate(mach_task_self(), (vm_address_t)addr, size) != KERN_SUCCESS)
166 >                return -1;
167   #else
168   #ifdef HAVE_MMAP_VM
169 <        int ret_code = munmap(addr, size);
170 <        return ret_code == 0 ? 0 : -1;
169 >        if (munmap(addr, size) != 0)
170 >                return -1;
171   #else
172          free(addr);
173        return 0;
173   #endif
174   #endif
175 +        
176 +        return 0;
177   }
178  
179   /* Change the memory protection of the region starting at ADDR and

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines