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

Side by Side Diff: runtime/vm/os.h

Issue 11414211: Expose transferable constructor to Int8List (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add tests Created 8 years 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
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 #ifndef VM_OS_H_ 5 #ifndef VM_OS_H_
6 #define VM_OS_H_ 6 #define VM_OS_H_
7 7
8 #include "vm/globals.h" 8 #include "vm/globals.h"
9 9
10 // Forward declarations. 10 // Forward declarations.
(...skipping 22 matching lines...) Expand all
33 static int GetLocalTimeZoneAdjustmentInSeconds(); 33 static int GetLocalTimeZoneAdjustmentInSeconds();
34 34
35 // Returns the current time in milliseconds measured 35 // Returns the current time in milliseconds measured
36 // from midnight January 1, 1970 UTC. 36 // from midnight January 1, 1970 UTC.
37 static int64_t GetCurrentTimeMillis(); 37 static int64_t GetCurrentTimeMillis();
38 38
39 // Returns the current time in microseconds measured 39 // Returns the current time in microseconds measured
40 // from midnight January 1, 1970 UTC. 40 // from midnight January 1, 1970 UTC.
41 static int64_t GetCurrentTimeMicros(); 41 static int64_t GetCurrentTimeMicros();
42 42
43 // Returns an aligned pointer in the C heap with room for size bytes.
44 // Alignment must be >= 16 and a power of two.
45 static void* AlignedAllocate(intptr_t size, intptr_t alignment);
46
47 // Frees a pointer returned from AlignedAllocate.
48 static void AlignedFree(void* ptr);
49
43 // Returns the activation frame alignment constraint or zero if 50 // Returns the activation frame alignment constraint or zero if
44 // the platform doesn't care. Guaranteed to be a power of two. 51 // the platform doesn't care. Guaranteed to be a power of two.
45 static word ActivationFrameAlignment(); 52 static word ActivationFrameAlignment();
46 53
47 // This constant is guaranteed to be greater or equal to the 54 // This constant is guaranteed to be greater or equal to the
48 // preferred code alignment on all platforms. 55 // preferred code alignment on all platforms.
49 static const int kMaxPreferredCodeAlignment = 32; 56 static const int kMaxPreferredCodeAlignment = 32;
50 57
51 // Returns the preferred code alignment or zero if 58 // Returns the preferred code alignment or zero if
52 // the platform doesn't care. Guaranteed to be a power of two. 59 // the platform doesn't care. Guaranteed to be a power of two.
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 static void Shutdown(); 109 static void Shutdown();
103 110
104 static void Abort(); 111 static void Abort();
105 112
106 static void Exit(int code); 113 static void Exit(int code);
107 }; 114 };
108 115
109 } // namespace dart 116 } // namespace dart
110 117
111 #endif // VM_OS_H_ 118 #endif // VM_OS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698