Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(278)

Side by Side Diff: third_party/tcmalloc/chromium/src/malloc_hook_mmap_linux.h

Issue 18314006: Enable DMP for system Chromium WebView on Android (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Do not indent preprocessor directives Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « third_party/tcmalloc/chromium/src/libc_override_gcc_and_weak.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2005, Google Inc. 1 // Copyright (c) 2005, Google Inc.
2 // All rights reserved. 2 // All rights reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions are 5 // modification, are permitted provided that the following conditions are
6 // met: 6 // met:
7 // 7 //
8 // * Redistributions of source code must retain the above copyright 8 // * Redistributions of source code must retain the above copyright
9 // notice, this list of conditions and the following disclaimer. 9 // notice, this list of conditions and the following disclaimer.
10 // * Redistributions in binary form must reproduce the above 10 // * Redistributions in binary form must reproduce the above
(...skipping 24 matching lines...) Expand all
35 // (which we're overriding with our mmap64() and mmap() wrappers) so we can't 35 // (which we're overriding with our mmap64() and mmap() wrappers) so we can't
36 // just call through to them. 36 // just call through to them.
37 37
38 #ifndef __linux 38 #ifndef __linux
39 # error Should only be including malloc_hook_mmap_linux.h on linux systems. 39 # error Should only be including malloc_hook_mmap_linux.h on linux systems.
40 #endif 40 #endif
41 41
42 #include <unistd.h> 42 #include <unistd.h>
43 #if defined(__ANDROID__) 43 #if defined(__ANDROID__)
44 #include <sys/syscall.h> 44 #include <sys/syscall.h>
45 #ifndef ANDROID_NON_SDK_BUILD
45 #include <sys/linux-syscalls.h> 46 #include <sys/linux-syscalls.h>
47 #endif
46 #else 48 #else
47 #include <syscall.h> 49 #include <syscall.h>
48 #endif 50 #endif
49 #include <sys/mman.h> 51 #include <sys/mman.h>
50 #include <errno.h> 52 #include <errno.h>
51 #include "base/linux_syscall_support.h" 53 #include "base/linux_syscall_support.h"
52 54
53 // SYS_mmap2, SYS_munmap, SYS_mremap and __off64_t are not defined in Android. 55 // SYS_mmap2, SYS_munmap, SYS_mremap and __off64_t are not defined in Android.
54 #if defined(__ANDROID__) 56 #if defined(__ANDROID__)
55 #ifndef SYS_mmap2 57 #ifndef SYS_mmap2
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 int result; 258 int result;
257 if (!MallocHook::InvokeMunmapReplacement(start, length, &result)) { 259 if (!MallocHook::InvokeMunmapReplacement(start, length, &result)) {
258 result = syscall(SYS_munmap, start, length); 260 result = syscall(SYS_munmap, start, length);
259 } 261 }
260 return result; 262 return result;
261 } 263 }
262 264
263 #undef MALLOC_HOOK_HAVE_DO_MMAP64 265 #undef MALLOC_HOOK_HAVE_DO_MMAP64
264 266
265 #endif // #ifdef MALLOC_HOOK_HAVE_DO_MMAP64 267 #endif // #ifdef MALLOC_HOOK_HAVE_DO_MMAP64
OLDNEW
« no previous file with comments | « third_party/tcmalloc/chromium/src/libc_override_gcc_and_weak.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698