| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |