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

Side by Side Diff: src/platform.h

Issue 9535013: Merge r10809 from the bleeding_edge to the 3.8 branch. (Closed) Base URL: http://v8.googlecode.com/svn/branches/3.8/
Patch Set: Created 8 years, 9 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
« no previous file with comments | « src/objects-visiting.h ('k') | src/platform-cygwin.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 // If the memory was reserved with an alignment, this size may be larger 349 // If the memory was reserved with an alignment, this size may be larger
350 // than the requested size. 350 // than the requested size.
351 size_t size() { return size_; } 351 size_t size() { return size_; }
352 352
353 // Commits real memory. Returns whether the operation succeeded. 353 // Commits real memory. Returns whether the operation succeeded.
354 bool Commit(void* address, size_t size, bool is_executable); 354 bool Commit(void* address, size_t size, bool is_executable);
355 355
356 // Uncommit real memory. Returns whether the operation succeeded. 356 // Uncommit real memory. Returns whether the operation succeeded.
357 bool Uncommit(void* address, size_t size); 357 bool Uncommit(void* address, size_t size);
358 358
359 // Creates a single guard page at the given address.
360 bool Guard(void* address);
361
359 void Release() { 362 void Release() {
360 ASSERT(IsReserved()); 363 ASSERT(IsReserved());
361 // Notice: Order is important here. The VirtualMemory object might live 364 // Notice: Order is important here. The VirtualMemory object might live
362 // inside the allocated region. 365 // inside the allocated region.
363 void* address = address_; 366 void* address = address_;
364 size_t size = size_; 367 size_t size = size_;
365 Reset(); 368 Reset();
366 bool result = ReleaseRegion(address, size); 369 bool result = ReleaseRegion(address, size);
367 USE(result); 370 USE(result);
368 ASSERT(result); 371 ASSERT(result);
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
694 Atomic32 active_; 697 Atomic32 active_;
695 PlatformData* data_; // Platform specific data. 698 PlatformData* data_; // Platform specific data.
696 int samples_taken_; // Counts stack samples taken. 699 int samples_taken_; // Counts stack samples taken.
697 DISALLOW_IMPLICIT_CONSTRUCTORS(Sampler); 700 DISALLOW_IMPLICIT_CONSTRUCTORS(Sampler);
698 }; 701 };
699 702
700 703
701 } } // namespace v8::internal 704 } } // namespace v8::internal
702 705
703 #endif // V8_PLATFORM_H_ 706 #endif // V8_PLATFORM_H_
OLDNEW
« no previous file with comments | « src/objects-visiting.h ('k') | src/platform-cygwin.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698