| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 311 return false; | 311 return false; |
| 312 } | 312 } |
| 313 | 313 |
| 314 UpdateAllocatedSpaceLimits(address, size); | 314 UpdateAllocatedSpaceLimits(address, size); |
| 315 return true; | 315 return true; |
| 316 } | 316 } |
| 317 | 317 |
| 318 | 318 |
| 319 bool VirtualMemory::Uncommit(void* address, size_t size) { | 319 bool VirtualMemory::Uncommit(void* address, size_t size) { |
| 320 return mmap(address, size, PROT_NONE, | 320 return mmap(address, size, PROT_NONE, |
| 321 MAP_PRIVATE | MAP_ANON | MAP_NORESERVE, | 321 MAP_PRIVATE | MAP_ANON | MAP_NORESERVE | MAP_FIXED, |
| 322 kMmapFd, kMmapFdOffset) != MAP_FAILED; | 322 kMmapFd, kMmapFdOffset) != MAP_FAILED; |
| 323 } | 323 } |
| 324 | 324 |
| 325 | 325 |
| 326 class ThreadHandle::PlatformData : public Malloced { | 326 class ThreadHandle::PlatformData : public Malloced { |
| 327 public: | 327 public: |
| 328 explicit PlatformData(ThreadHandle::Kind kind) { | 328 explicit PlatformData(ThreadHandle::Kind kind) { |
| 329 Initialize(kind); | 329 Initialize(kind); |
| 330 } | 330 } |
| 331 | 331 |
| (...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 621 | 621 |
| 622 // Deallocate Mach port for thread. | 622 // Deallocate Mach port for thread. |
| 623 if (IsProfiling()) { | 623 if (IsProfiling()) { |
| 624 mach_port_deallocate(data_->task_self_, data_->profiled_thread_); | 624 mach_port_deallocate(data_->task_self_, data_->profiled_thread_); |
| 625 } | 625 } |
| 626 } | 626 } |
| 627 | 627 |
| 628 #endif // ENABLE_LOGGING_AND_PROFILING | 628 #endif // ENABLE_LOGGING_AND_PROFILING |
| 629 | 629 |
| 630 } } // namespace v8::internal | 630 } } // namespace v8::internal |
| OLD | NEW |