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

Side by Side Diff: src/platform.h

Issue 7538028: Mark optimized modulo and memcpy code pages -w after writing them. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 4 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/ia32/codegen-ia32.cc ('k') | src/platform-posix.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 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 static void VPrintError(const char* format, va_list args); 200 static void VPrintError(const char* format, va_list args);
201 201
202 // Allocate/Free memory used by JS heap. Pages are readable/writable, but 202 // Allocate/Free memory used by JS heap. Pages are readable/writable, but
203 // they are not guaranteed to be executable unless 'executable' is true. 203 // they are not guaranteed to be executable unless 'executable' is true.
204 // Returns the address of allocated memory, or NULL if failed. 204 // Returns the address of allocated memory, or NULL if failed.
205 static void* Allocate(const size_t requested, 205 static void* Allocate(const size_t requested,
206 size_t* allocated, 206 size_t* allocated,
207 bool is_executable); 207 bool is_executable);
208 static void Free(void* address, const size_t size); 208 static void Free(void* address, const size_t size);
209 209
210 // Mark code segments non-writable.
211 static void ProtectCode(void* address, const size_t size);
212
210 // Assign memory as a guard page so that access will cause an exception. 213 // Assign memory as a guard page so that access will cause an exception.
211 static void Guard(void* address, const size_t size); 214 static void Guard(void* address, const size_t size);
212 215
213 // Get the Alignment guaranteed by Allocate(). 216 // Get the Alignment guaranteed by Allocate().
214 static size_t AllocateAlignment(); 217 static size_t AllocateAlignment();
215 218
216 // Returns an indication of whether a pointer is in a space that 219 // Returns an indication of whether a pointer is in a space that
217 // has been allocated by Allocate(). This method may conservatively 220 // has been allocated by Allocate(). This method may conservatively
218 // always return false, but giving more accurate information may 221 // always return false, but giving more accurate information may
219 // improve the robustness of the stack dump code in the presence of 222 // improve the robustness of the stack dump code in the presence of
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after
658 Atomic32 active_; 661 Atomic32 active_;
659 PlatformData* data_; // Platform specific data. 662 PlatformData* data_; // Platform specific data.
660 int samples_taken_; // Counts stack samples taken. 663 int samples_taken_; // Counts stack samples taken.
661 DISALLOW_IMPLICIT_CONSTRUCTORS(Sampler); 664 DISALLOW_IMPLICIT_CONSTRUCTORS(Sampler);
662 }; 665 };
663 666
664 667
665 } } // namespace v8::internal 668 } } // namespace v8::internal
666 669
667 #endif // V8_PLATFORM_H_ 670 #endif // V8_PLATFORM_H_
OLDNEW
« no previous file with comments | « src/ia32/codegen-ia32.cc ('k') | src/platform-posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698