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

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

Issue 7491089: Make experimental/gc compilable on Mac OS. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: Created 9 years, 4 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
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 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 598 matching lines...) Expand 10 before | Expand all | Expand 10 after
609 609
610 610
611 VirtualMemory::VirtualMemory(size_t size) { 611 VirtualMemory::VirtualMemory(size_t size) {
612 address_ = ReserveRegion(size); 612 address_ = ReserveRegion(size);
613 size_ = size; 613 size_ = size;
614 } 614 }
615 615
616 616
617 VirtualMemory::~VirtualMemory() { 617 VirtualMemory::~VirtualMemory() {
618 if (IsReserved()) { 618 if (IsReserved()) {
619 if (0 == munmap(address(), size())) address_ = NULL; 619 if (ReleaseRegion(address(), size())) address_ = NULL;
620 } 620 }
621 } 621 }
622 622
623 623
624 bool VirtualMemory::IsReserved() { 624 bool VirtualMemory::IsReserved() {
625 return address_ != NULL; 625 return address_ != NULL;
626 } 626 }
627 627
628 628
629 bool VirtualMemory::Commit(void* address, size_t size, bool is_executable) { 629 bool VirtualMemory::Commit(void* address, size_t size, bool is_executable) {
(...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after
1177 1177
1178 1178
1179 void Sampler::Stop() { 1179 void Sampler::Stop() {
1180 ASSERT(IsActive()); 1180 ASSERT(IsActive());
1181 SignalSender::RemoveActiveSampler(this); 1181 SignalSender::RemoveActiveSampler(this);
1182 SetActive(false); 1182 SetActive(false);
1183 } 1183 }
1184 1184
1185 1185
1186 } } // namespace v8::internal 1186 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/isolate.cc ('k') | src/platform-macos.cc » ('j') | src/platform-macos.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698