syscall_emul.hh (6658:f4de76601762) | syscall_emul.hh (6672:b636411c118e) |
---|---|
1/* 2 * Copyright (c) 2003-2005 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 964 unchanged lines hidden (view full) --- 973 } 974 975 if (start != 0) { 976 warn("mmap: ignoring suggested map address 0x%x, using 0x%x", 977 start, p->mmap_end); 978 } 979 980 // pick next address from our "mmap region" | 1/* 2 * Copyright (c) 2003-2005 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 964 unchanged lines hidden (view full) --- 973 } 974 975 if (start != 0) { 976 warn("mmap: ignoring suggested map address 0x%x, using 0x%x", 977 start, p->mmap_end); 978 } 979 980 // pick next address from our "mmap region" |
981 start = p->mmap_end; | 981 if (OS::mmapGrowsDown()) { 982 start = p->mmap_end - length; 983 p->mmap_end = start; 984 } else { 985 start = p->mmap_end; 986 p->mmap_end += length; 987 } |
982 p->pTable->allocate(start, length); | 988 p->pTable->allocate(start, length); |
983 p->mmap_end += length; | |
984 985 if (!(flags & OS::TGT_MAP_ANONYMOUS)) { 986 warn("allowing mmap of file @ fd %d. " 987 "This will break if not /dev/zero.", p->getSyscallArg(tc, 4)); 988 } 989 990 return start; 991} --- 141 unchanged lines hidden --- | 989 990 if (!(flags & OS::TGT_MAP_ANONYMOUS)) { 991 warn("allowing mmap of file @ fd %d. " 992 "This will break if not /dev/zero.", p->getSyscallArg(tc, 4)); 993 } 994 995 return start; 996} --- 141 unchanged lines hidden --- |