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

Side by Side Diff: src/platform-qnx.cc

Issue 326323002: Don't use LOG() from platform. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 6 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 | « src/platform-openbsd.cc ('k') | src/platform-solaris.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Platform-specific code for QNX goes here. For the POSIX-compatible 5 // Platform-specific code for QNX goes here. For the POSIX-compatible
6 // parts the implementation is in platform-posix.cc. 6 // parts the implementation is in platform-posix.cc.
7 7
8 #include <pthread.h> 8 #include <pthread.h>
9 #include <semaphore.h> 9 #include <semaphore.h>
10 #include <signal.h> 10 #include <signal.h>
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 } 104 }
105 105
106 106
107 void* OS::Allocate(const size_t requested, 107 void* OS::Allocate(const size_t requested,
108 size_t* allocated, 108 size_t* allocated,
109 bool is_executable) { 109 bool is_executable) {
110 const size_t msize = RoundUp(requested, AllocateAlignment()); 110 const size_t msize = RoundUp(requested, AllocateAlignment());
111 int prot = PROT_READ | PROT_WRITE | (is_executable ? PROT_EXEC : 0); 111 int prot = PROT_READ | PROT_WRITE | (is_executable ? PROT_EXEC : 0);
112 void* addr = OS::GetRandomMmapAddr(); 112 void* addr = OS::GetRandomMmapAddr();
113 void* mbase = mmap(addr, msize, prot, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); 113 void* mbase = mmap(addr, msize, prot, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
114 if (mbase == MAP_FAILED) { 114 if (mbase == MAP_FAILED) return NULL;
115 LOG(i::Isolate::Current(),
116 StringEvent("OS::Allocate", "mmap failed"));
117 return NULL;
118 }
119 *allocated = msize; 115 *allocated = msize;
120 return mbase; 116 return mbase;
121 } 117 }
122 118
123 119
124 class PosixMemoryMappedFile : public OS::MemoryMappedFile { 120 class PosixMemoryMappedFile : public OS::MemoryMappedFile {
125 public: 121 public:
126 PosixMemoryMappedFile(FILE* file, void* memory, int size) 122 PosixMemoryMappedFile(FILE* file, void* memory, int size)
127 : file_(file), memory_(memory), size_(size) { } 123 : file_(file), memory_(memory), size_(size) { }
128 virtual ~PosixMemoryMappedFile(); 124 virtual ~PosixMemoryMappedFile();
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 bool VirtualMemory::ReleaseRegion(void* base, size_t size) { 364 bool VirtualMemory::ReleaseRegion(void* base, size_t size) {
369 return munmap(base, size) == 0; 365 return munmap(base, size) == 0;
370 } 366 }
371 367
372 368
373 bool VirtualMemory::HasLazyCommits() { 369 bool VirtualMemory::HasLazyCommits() {
374 return false; 370 return false;
375 } 371 }
376 372
377 } } // namespace v8::internal 373 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/platform-openbsd.cc ('k') | src/platform-solaris.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698