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

Side by Side Diff: vm/os_win.cc

Issue 10782016: Enforce length/size limits for variable size heap object in order to (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 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 | « vm/os_macos.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/os.h" 5 #include "vm/os.h"
6 6
7 #include <time.h> 7 #include <time.h>
8 8
9 #include "platform/assert.h" 9 #include "platform/assert.h"
10 10
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 // Windows 64-bit ABI requires the stack to be 16-byte aligned. 99 // Windows 64-bit ABI requires the stack to be 16-byte aligned.
100 return 16; 100 return 16;
101 #else 101 #else
102 // No requirements on Win32. 102 // No requirements on Win32.
103 return 0; 103 return 0;
104 #endif 104 #endif
105 } 105 }
106 106
107 107
108 word OS::PreferredCodeAlignment() { 108 word OS::PreferredCodeAlignment() {
109 ASSERT(16 <= OS::kMaxPreferredCodeAlignment);
109 return 16; 110 return 16;
110 } 111 }
111 112
112 113
113 uword OS::GetStackSizeLimit() { 114 uword OS::GetStackSizeLimit() {
114 // TODO(ager): Can you programatically determine the actual stack 115 // TODO(ager): Can you programatically determine the actual stack
115 // size limit on Windows? The 2MB limit is set at link time. Maybe 116 // size limit on Windows? The 2MB limit is set at link time. Maybe
116 // that value should be propagated here? 117 // that value should be propagated here?
117 return 2 * MB; 118 return 2 * MB;
118 } 119 }
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 void OS::Abort() { 233 void OS::Abort() {
233 abort(); 234 abort();
234 } 235 }
235 236
236 237
237 void OS::Exit(int code) { 238 void OS::Exit(int code) {
238 exit(code); 239 exit(code);
239 } 240 }
240 241
241 } // namespace dart 242 } // namespace dart
OLDNEW
« no previous file with comments | « vm/os_macos.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698