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

Side by Side Diff: src/platform-cygwin.cc

Issue 23458022: Use PAGE_NOACCESS for guard pages in Windows. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 3 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 | « no previous file | 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 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 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 368
369 UpdateAllocatedSpaceLimits(base, static_cast<int>(size)); 369 UpdateAllocatedSpaceLimits(base, static_cast<int>(size));
370 return true; 370 return true;
371 } 371 }
372 372
373 373
374 bool VirtualMemory::Guard(void* address) { 374 bool VirtualMemory::Guard(void* address) {
375 if (NULL == VirtualAlloc(address, 375 if (NULL == VirtualAlloc(address,
376 OS::CommitPageSize(), 376 OS::CommitPageSize(),
377 MEM_COMMIT, 377 MEM_COMMIT,
378 PAGE_READONLY | PAGE_GUARD)) { 378 PAGE_NOACCESS)) {
379 return false; 379 return false;
380 } 380 }
381 return true; 381 return true;
382 } 382 }
383 383
384 384
385 bool VirtualMemory::UncommitRegion(void* base, size_t size) { 385 bool VirtualMemory::UncommitRegion(void* base, size_t size) {
386 return VirtualFree(base, size, MEM_DECOMMIT) != 0; 386 return VirtualFree(base, size, MEM_DECOMMIT) != 0;
387 } 387 }
388 388
(...skipping 20 matching lines...) Expand all
409 limit_mutex = new Mutex(); 409 limit_mutex = new Mutex();
410 } 410 }
411 411
412 412
413 void OS::TearDown() { 413 void OS::TearDown() {
414 delete limit_mutex; 414 delete limit_mutex;
415 } 415 }
416 416
417 417
418 } } // namespace v8::internal 418 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/platform-posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698