aboutsummaryrefslogtreecommitdiff
path: root/src/common/linux/memory.h
diff options
context:
space:
mode:
authornealsid <nealsid@4c0a9323-5329-0410-9bdc-e9ce6186880e>2009-12-01 21:35:52 +0000
committernealsid <nealsid@4c0a9323-5329-0410-9bdc-e9ce6186880e>2009-12-01 21:35:52 +0000
commit096992fac73756cfa0974a94754329f30fd4e786 (patch)
treec38f1e56f91e8f167b9e5012662f31fc2da434aa /src/common/linux/memory.h
parentdon't output duplicate filenames in PDBSourceLineWriter. r=mark at http://bre... (diff)
downloadbreakpad-096992fac73756cfa0974a94754329f30fd4e786.tar.xz
Upstreaming several patches from Chrome:
Build fix for systems where sys/user.h needs sys/types.h.... http://breakpad.appspot.com/40002 MDRawSystemInfo.processor_level refers to the CPU family, not the cpuid level.. http://breakpad.appspot.com/40003 Use MD_MODULE_SIZE in place of sizeof(MDRawModule). http://breakpad.appspot.com/39003 Linux x64 compile fix. http://breakpad.appspot.com/40004 Include linux_syscall_support.h to get definition of NT_PRXFPREG. This is Chromium commit 23659. http://breakpad.appspot.com/40005 Build breakpad / crash reporting on Linux 64-bit. This is Chromium commit 23396. http://breakpad.appspot.com/40006 Fix #includes in a couple unit tests. http://breakpad.appspot.com/41001 Clean up unused headers / files for Linux dump_syms. http://breakpad.appspot.com/40002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@432 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/common/linux/memory.h')
-rw-r--r--src/common/linux/memory.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/common/linux/memory.h b/src/common/linux/memory.h
index 7cae40ef..f10a194b 100644
--- a/src/common/linux/memory.h
+++ b/src/common/linux/memory.h
@@ -86,8 +86,13 @@ class PageAllocator {
private:
uint8_t *GetNPages(unsigned num_pages) {
+#ifdef __x86_64
+ void *a = sys_mmap(NULL, page_size_ * num_pages, PROT_READ | PROT_WRITE,
+ MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
+#else
void *a = sys_mmap2(NULL, page_size_ * num_pages, PROT_READ | PROT_WRITE,
MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
+#endif
if (a == MAP_FAILED)
return NULL;