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

Side by Side Diff: src/platform-freebsd.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-cygwin.cc ('k') | src/platform-linux.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 FreeBSD goes here. For the POSIX-compatible 5 // Platform-specific code for FreeBSD 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 } 55 }
56 56
57 57
58 void* OS::Allocate(const size_t requested, 58 void* OS::Allocate(const size_t requested,
59 size_t* allocated, 59 size_t* allocated,
60 bool executable) { 60 bool executable) {
61 const size_t msize = RoundUp(requested, getpagesize()); 61 const size_t msize = RoundUp(requested, getpagesize());
62 int prot = PROT_READ | PROT_WRITE | (executable ? PROT_EXEC : 0); 62 int prot = PROT_READ | PROT_WRITE | (executable ? PROT_EXEC : 0);
63 void* mbase = mmap(NULL, msize, prot, MAP_PRIVATE | MAP_ANON, -1, 0); 63 void* mbase = mmap(NULL, msize, prot, MAP_PRIVATE | MAP_ANON, -1, 0);
64 64
65 if (mbase == MAP_FAILED) { 65 if (mbase == MAP_FAILED) return NULL;
66 LOG(Isolate::Current(), StringEvent("OS::Allocate", "mmap failed"));
67 return NULL;
68 }
69 *allocated = msize; 66 *allocated = msize;
70 return mbase; 67 return mbase;
71 } 68 }
72 69
73 70
74 class PosixMemoryMappedFile : public OS::MemoryMappedFile { 71 class PosixMemoryMappedFile : public OS::MemoryMappedFile {
75 public: 72 public:
76 PosixMemoryMappedFile(FILE* file, void* memory, int size) 73 PosixMemoryMappedFile(FILE* file, void* memory, int size)
77 : file_(file), memory_(memory), size_(size) { } 74 : file_(file), memory_(memory), size_(size) { }
78 virtual ~PosixMemoryMappedFile(); 75 virtual ~PosixMemoryMappedFile();
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 return munmap(base, size) == 0; 296 return munmap(base, size) == 0;
300 } 297 }
301 298
302 299
303 bool VirtualMemory::HasLazyCommits() { 300 bool VirtualMemory::HasLazyCommits() {
304 // TODO(alph): implement for the platform. 301 // TODO(alph): implement for the platform.
305 return false; 302 return false;
306 } 303 }
307 304
308 } } // namespace v8::internal 305 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/platform-cygwin.cc ('k') | src/platform-linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698