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

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

Issue 6685088: Merge isolates to bleeding_edge. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 9 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.h ('k') | src/platform-freebsd.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 2006-2011 the V8 project authors. All rights reserved. 1 // Copyright 2006-2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 } 136 }
137 137
138 138
139 void* OS::Allocate(const size_t requested, 139 void* OS::Allocate(const size_t requested,
140 size_t* allocated, 140 size_t* allocated,
141 bool is_executable) { 141 bool is_executable) {
142 const size_t msize = RoundUp(requested, sysconf(_SC_PAGESIZE)); 142 const size_t msize = RoundUp(requested, sysconf(_SC_PAGESIZE));
143 int prot = PROT_READ | PROT_WRITE | (is_executable ? PROT_EXEC : 0); 143 int prot = PROT_READ | PROT_WRITE | (is_executable ? PROT_EXEC : 0);
144 void* mbase = mmap(NULL, msize, prot, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); 144 void* mbase = mmap(NULL, msize, prot, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
145 if (mbase == MAP_FAILED) { 145 if (mbase == MAP_FAILED) {
146 LOG(StringEvent("OS::Allocate", "mmap failed")); 146 LOG(ISOLATE, StringEvent("OS::Allocate", "mmap failed"));
147 return NULL; 147 return NULL;
148 } 148 }
149 *allocated = msize; 149 *allocated = msize;
150 UpdateAllocatedSpaceLimits(mbase, msize); 150 UpdateAllocatedSpaceLimits(mbase, msize);
151 return mbase; 151 return mbase;
152 } 152 }
153 153
154 154
155 void OS::Free(void* address, const size_t size) { 155 void OS::Free(void* address, const size_t size) {
156 // TODO(1240712): munmap has a return value which is ignored here. 156 // TODO(1240712): munmap has a return value which is ignored here.
(...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after
736 // Release the thread handles 736 // Release the thread handles
737 CloseHandle(data_->sampler_thread_); 737 CloseHandle(data_->sampler_thread_);
738 CloseHandle(data_->profiled_thread_); 738 CloseHandle(data_->profiled_thread_);
739 } 739 }
740 740
741 741
742 #endif // ENABLE_LOGGING_AND_PROFILING 742 #endif // ENABLE_LOGGING_AND_PROFILING
743 743
744 } } // namespace v8::internal 744 } } // namespace v8::internal
745 745
OLDNEW
« no previous file with comments | « src/platform.h ('k') | src/platform-freebsd.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698