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

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

Issue 9535013: Merge r10809 from the bleeding_edge to the 3.8 branch. (Closed) Base URL: http://v8.googlecode.com/svn/branches/3.8/
Patch Set: Created 8 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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 return true; 348 return true;
349 } 349 }
350 350
351 351
352 bool VirtualMemory::Uncommit(void* address, size_t size) { 352 bool VirtualMemory::Uncommit(void* address, size_t size) {
353 ASSERT(IsReserved()); 353 ASSERT(IsReserved());
354 return VirtualFree(address, size, MEM_DECOMMIT) != false; 354 return VirtualFree(address, size, MEM_DECOMMIT) != false;
355 } 355 }
356 356
357 357
358 bool VirtualMemory::Guard(void* address) {
359 if (NULL == VirtualAlloc(address,
360 OS::CommitPageSize(),
361 MEM_COMMIT,
362 PAGE_READONLY | PAGE_GUARD)) {
363 return false;
364 }
365 return true;
366 }
367
368
358 class Thread::PlatformData : public Malloced { 369 class Thread::PlatformData : public Malloced {
359 public: 370 public:
360 PlatformData() : thread_(kNoThread) {} 371 PlatformData() : thread_(kNoThread) {}
361 pthread_t thread_; // Thread handle for pthread. 372 pthread_t thread_; // Thread handle for pthread.
362 }; 373 };
363 374
364 375
365 376
366 377
367 Thread::Thread(const Options& options) 378 Thread::Thread(const Options& options)
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
755 766
756 767
757 void Sampler::Stop() { 768 void Sampler::Stop() {
758 ASSERT(IsActive()); 769 ASSERT(IsActive());
759 SamplerThread::RemoveActiveSampler(this); 770 SamplerThread::RemoveActiveSampler(this);
760 SetActive(false); 771 SetActive(false);
761 } 772 }
762 773
763 774
764 } } // namespace v8::internal 775 } } // namespace v8::internal
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