OLD | NEW |
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 1519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1530 } | 1530 } |
1531 | 1531 |
1532 | 1532 |
1533 void VirtualMemory::Reset() { | 1533 void VirtualMemory::Reset() { |
1534 address_ = NULL; | 1534 address_ = NULL; |
1535 size_ = 0; | 1535 size_ = 0; |
1536 } | 1536 } |
1537 | 1537 |
1538 | 1538 |
1539 bool VirtualMemory::Commit(void* address, size_t size, bool is_executable) { | 1539 bool VirtualMemory::Commit(void* address, size_t size, bool is_executable) { |
1540 if (CommitRegion(address, size, is_executable)) { | 1540 return CommitRegion(address, size, is_executable); |
1541 UpdateAllocatedSpaceLimits(address, static_cast<int>(size)); | |
1542 return true; | |
1543 } | |
1544 return false; | |
1545 } | 1541 } |
1546 | 1542 |
1547 | 1543 |
1548 bool VirtualMemory::Uncommit(void* address, size_t size) { | 1544 bool VirtualMemory::Uncommit(void* address, size_t size) { |
1549 ASSERT(IsReserved()); | 1545 ASSERT(IsReserved()); |
1550 return UncommitRegion(address, size); | 1546 return UncommitRegion(address, size); |
1551 } | 1547 } |
1552 | 1548 |
1553 | 1549 |
1554 bool VirtualMemory::Guard(void* address) { | 1550 bool VirtualMemory::Guard(void* address) { |
(...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2175 | 2171 |
2176 | 2172 |
2177 void Sampler::Stop() { | 2173 void Sampler::Stop() { |
2178 ASSERT(IsActive()); | 2174 ASSERT(IsActive()); |
2179 SamplerThread::RemoveActiveSampler(this); | 2175 SamplerThread::RemoveActiveSampler(this); |
2180 SetActive(false); | 2176 SetActive(false); |
2181 } | 2177 } |
2182 | 2178 |
2183 | 2179 |
2184 } } // namespace v8::internal | 2180 } } // namespace v8::internal |
OLD | NEW |