Added additional SYS_mmap fixes for FreeBSD due to syscall differences between os versions (pulled from differences between FreeBSD6 and FreeBSD8 mmap implementations)

git-svn-id: http://gperftools.googlecode.com/svn/trunk@125 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
This commit is contained in:
chappedm@gmail.com 2011-11-30 02:54:35 +00:00
parent 8c8329390c
commit 7da0200301

View File

@ -68,8 +68,13 @@ extern "C" {
static inline void* do_mmap(void *start, size_t length,
int prot, int flags,
int fd, off_t offset) __THROW {
if (__FreeBSD_version >= 700051) {
return (void *)MALLOC_HOOK_SYSCALL(SYS_mmap,
start, length, prot, flags, fd, offset);
}
return (void *)MALLOC_HOOK_SYSCALL(SYS_mmap,
start, length, prot, flags, fd, offset);
start, length, prot, flags, fd, 0, offset);
}
static inline void* do_sbrk(intptr_t increment) {