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

Side by Side Diff: vm/os_macos.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_linux.cc ('k') | vm/os_win.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 (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 <errno.h> 7 #include <errno.h>
8 #include <limits.h> 8 #include <limits.h>
9 #include <mach/mach.h> 9 #include <mach/mach.h>
10 #include <mach/clock.h> 10 #include <mach/clock.h>
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 69
70 70
71 word OS::ActivationFrameAlignment() { 71 word OS::ActivationFrameAlignment() {
72 // OS X activation frames must be 16 byte-aligned; see "Mac OS X ABI 72 // OS X activation frames must be 16 byte-aligned; see "Mac OS X ABI
73 // Function Call Guide". 73 // Function Call Guide".
74 return 16; 74 return 16;
75 } 75 }
76 76
77 77
78 word OS::PreferredCodeAlignment() { 78 word OS::PreferredCodeAlignment() {
79 ASSERT(32 <= OS::kMaxPreferredCodeAlignment);
79 return 32; 80 return 32;
80 } 81 }
81 82
82 83
83 uword OS::GetStackSizeLimit() { 84 uword OS::GetStackSizeLimit() {
84 struct rlimit stack_limit; 85 struct rlimit stack_limit;
85 int retval = getrlimit(RLIMIT_STACK, &stack_limit); 86 int retval = getrlimit(RLIMIT_STACK, &stack_limit);
86 ASSERT(retval == 0); 87 ASSERT(retval == 0);
87 if (stack_limit.rlim_cur > INT_MAX) { 88 if (stack_limit.rlim_cur > INT_MAX) {
88 retval = INT_MAX; 89 retval = INT_MAX;
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 void OS::Abort() { 181 void OS::Abort() {
181 abort(); 182 abort();
182 } 183 }
183 184
184 185
185 void OS::Exit(int code) { 186 void OS::Exit(int code) {
186 exit(code); 187 exit(code);
187 } 188 }
188 189
189 } // namespace dart 190 } // namespace dart
OLDNEW
« no previous file with comments | « vm/os_linux.cc ('k') | vm/os_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698