vm_mmap.c (f711d546d27edc6115841ef780df0252d44a996d) | vm_mmap.c (d28ab90f02e733159b819fc702ecb130b8fb70fc) |
---|---|
1/* 2 * Copyright (c) 1988 University of Utah. 3 * Copyright (c) 1991, 1993 4 * The Regents of the University of California. All rights reserved. 5 * 6 * This code is derived from software contributed to Berkeley by 7 * the Systems Programming Group of the University of Utah Computer 8 * Science Department. --- 24 unchanged lines hidden (view full) --- 33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 36 * SUCH DAMAGE. 37 * 38 * from: Utah $Hdr: vm_mmap.c 1.6 91/10/21$ 39 * 40 * @(#)vm_mmap.c 8.4 (Berkeley) 1/12/94 | 1/* 2 * Copyright (c) 1988 University of Utah. 3 * Copyright (c) 1991, 1993 4 * The Regents of the University of California. All rights reserved. 5 * 6 * This code is derived from software contributed to Berkeley by 7 * the Systems Programming Group of the University of Utah Computer 8 * Science Department. --- 24 unchanged lines hidden (view full) --- 33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 36 * SUCH DAMAGE. 37 * 38 * from: Utah $Hdr: vm_mmap.c 1.6 91/10/21$ 39 * 40 * @(#)vm_mmap.c 8.4 (Berkeley) 1/12/94 |
41 * $Id: vm_mmap.c,v 1.93 1999/04/19 14:14:10 peter Exp $ | 41 * $Id: vm_mmap.c,v 1.94 1999/04/27 11:18:49 phk Exp $ |
42 */ 43 44/* 45 * Mapped file (mmap) interface to VM 46 */ 47 48#include "opt_compat.h" 49#include "opt_rlimit.h" --- 173 unchanged lines hidden (view full) --- 223 /* 224 * XXX for non-fixed mappings where no hint is provided or 225 * the hint would fall in the potential heap space, 226 * place it after the end of the largest possible heap. 227 * 228 * There should really be a pmap call to determine a reasonable 229 * location. 230 */ | 42 */ 43 44/* 45 * Mapped file (mmap) interface to VM 46 */ 47 48#include "opt_compat.h" 49#include "opt_rlimit.h" --- 173 unchanged lines hidden (view full) --- 223 /* 224 * XXX for non-fixed mappings where no hint is provided or 225 * the hint would fall in the potential heap space, 226 * place it after the end of the largest possible heap. 227 * 228 * There should really be a pmap call to determine a reasonable 229 * location. 230 */ |
231 else if (addr < round_page((vm_offset_t)p->p_vmspace->vm_daddr + MAXDSIZ)) | 231 else if (addr == 0 || 232 addr >= round_page((vm_offset_t)p->p_vmspace->vm_taddr) && 233 addr < round_page((vm_offset_t)p->p_vmspace->vm_daddr + MAXDSIZ)) |
232 addr = round_page((vm_offset_t)p->p_vmspace->vm_daddr + MAXDSIZ); 233 234 if (flags & MAP_ANON) { 235 /* 236 * Mapping blank space is trivial. 237 */ 238 handle = NULL; 239 maxprot = VM_PROT_ALL; --- 864 unchanged lines hidden --- | 234 addr = round_page((vm_offset_t)p->p_vmspace->vm_daddr + MAXDSIZ); 235 236 if (flags & MAP_ANON) { 237 /* 238 * Mapping blank space is trivial. 239 */ 240 handle = NULL; 241 maxprot = VM_PROT_ALL; --- 864 unchanged lines hidden --- |