syscall_emul.hh (11385:dbbf54058f6f) | syscall_emul.hh (11386:94c09b607a84) |
---|---|
1/* 2 * Copyright (c) 2012-2013, 2015 ARM Limited 3 * Copyright (c) 2015 Advanced Micro Devices, Inc. 4 * All rights reserved 5 * 6 * The license below extends only to copyright in the software and shall 7 * not be construed as granting a license to any other intellectual 8 * property including but not limited to intellectual property relating --- 1283 unchanged lines hidden (view full) --- 1292 warn("mmap: failed to map file into host address space"); 1293 return -errno; 1294 } 1295 } 1296 1297 // Extend global mmap region if necessary. Note that we ignore the 1298 // start address unless MAP_FIXED is specified. 1299 if (!(tgt_flags & OS::TGT_MAP_FIXED)) { | 1/* 2 * Copyright (c) 2012-2013, 2015 ARM Limited 3 * Copyright (c) 2015 Advanced Micro Devices, Inc. 4 * All rights reserved 5 * 6 * The license below extends only to copyright in the software and shall 7 * not be construed as granting a license to any other intellectual 8 * property including but not limited to intellectual property relating --- 1283 unchanged lines hidden (view full) --- 1292 warn("mmap: failed to map file into host address space"); 1293 return -errno; 1294 } 1295 } 1296 1297 // Extend global mmap region if necessary. Note that we ignore the 1298 // start address unless MAP_FIXED is specified. 1299 if (!(tgt_flags & OS::TGT_MAP_FIXED)) { |
1300 start = (OS::mmapGrowsDown()) ? p->mmap_end - length : p->mmap_end; 1301 p->mmap_end = (OS::mmapGrowsDown()) ? start : p->mmap_end + length; | 1300 start = p->mmapGrowsDown() ? p->mmap_end - length : p->mmap_end; 1301 p->mmap_end = p->mmapGrowsDown() ? start : p->mmap_end + length; |
1302 } 1303 1304 DPRINTF_SYSCALL(Verbose, " mmap range is 0x%x - 0x%x\n", 1305 start, start + length - 1); 1306 1307 // We only allow mappings to overwrite existing mappings if 1308 // TGT_MAP_FIXED is set. Otherwise it shouldn't be a problem 1309 // because we ignore the start hint if TGT_MAP_FIXED is not set. --- 298 unchanged lines hidden --- | 1302 } 1303 1304 DPRINTF_SYSCALL(Verbose, " mmap range is 0x%x - 0x%x\n", 1305 start, start + length - 1); 1306 1307 // We only allow mappings to overwrite existing mappings if 1308 // TGT_MAP_FIXED is set. Otherwise it shouldn't be a problem 1309 // because we ignore the start hint if TGT_MAP_FIXED is not set. --- 298 unchanged lines hidden --- |