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 1533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1544 bool VirtualMemory::UncommitRegion(void* base, size_t size) { | 1544 bool VirtualMemory::UncommitRegion(void* base, size_t size) { |
1545 return VirtualFree(base, size, MEM_DECOMMIT) != 0; | 1545 return VirtualFree(base, size, MEM_DECOMMIT) != 0; |
1546 } | 1546 } |
1547 | 1547 |
1548 | 1548 |
1549 bool VirtualMemory::ReleaseRegion(void* base, size_t size) { | 1549 bool VirtualMemory::ReleaseRegion(void* base, size_t size) { |
1550 return VirtualFree(base, 0, MEM_RELEASE) != 0; | 1550 return VirtualFree(base, 0, MEM_RELEASE) != 0; |
1551 } | 1551 } |
1552 | 1552 |
1553 | 1553 |
| 1554 bool VirtualMemory::HasLazyCommits() { |
| 1555 // TODO(alph): implement for the platform. |
| 1556 return false; |
| 1557 } |
| 1558 |
| 1559 |
1554 // ---------------------------------------------------------------------------- | 1560 // ---------------------------------------------------------------------------- |
1555 // Win32 thread support. | 1561 // Win32 thread support. |
1556 | 1562 |
1557 // Definition of invalid thread handle and id. | 1563 // Definition of invalid thread handle and id. |
1558 static const HANDLE kNoThread = INVALID_HANDLE_VALUE; | 1564 static const HANDLE kNoThread = INVALID_HANDLE_VALUE; |
1559 | 1565 |
1560 // Entry point for threads. The supplied argument is a pointer to the thread | 1566 // Entry point for threads. The supplied argument is a pointer to the thread |
1561 // object. The entry function dispatches to the run method in the thread | 1567 // object. The entry function dispatches to the run method in the thread |
1562 // object. It is important that this function has __stdcall calling | 1568 // object. It is important that this function has __stdcall calling |
1563 // convention. | 1569 // convention. |
(...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2127 | 2133 |
2128 | 2134 |
2129 void Sampler::Stop() { | 2135 void Sampler::Stop() { |
2130 ASSERT(IsActive()); | 2136 ASSERT(IsActive()); |
2131 SamplerThread::RemoveActiveSampler(this); | 2137 SamplerThread::RemoveActiveSampler(this); |
2132 SetActive(false); | 2138 SetActive(false); |
2133 } | 2139 } |
2134 | 2140 |
2135 | 2141 |
2136 } } // namespace v8::internal | 2142 } } // namespace v8::internal |
OLD | NEW |