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

Unified Diff: runtime/vm/os_macos.cc

Issue 11414211: Expose transferable constructor to Int8List (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: os.h fix Created 8 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: runtime/vm/os_macos.cc
diff --git a/runtime/vm/os_macos.cc b/runtime/vm/os_macos.cc
index 94470b508e9a50eeb46279c63318f9cea518817c..1e7c4f670e91c22eb4c02ff6b3cb0be413090744 100644
--- a/runtime/vm/os_macos.cc
+++ b/runtime/vm/os_macos.cc
@@ -68,6 +68,25 @@ int64_t OS::GetCurrentTimeMicros() {
}
+void* OS::AlignedAllocate(intptr_t size, intptr_t alignment) {
+ const int kMinimumAlignment = 16;
+ ASSERT(Utils::IsPowerOfTwo(alignment));
+ ASSERT(alignment >= kMinimumAlignment);
+ void* p = NULL;
+ int r;
+ r = posix_memalign(&p, alignment, size);
+ if (p == NULL) {
+ UNREACHABLE();
+ }
+ return p;
+}
+
+
+void OS::AlignedFree(void* ptr) {
+ free(ptr);
+}
+
+
word OS::ActivationFrameAlignment() {
// OS X activation frames must be 16 byte-aligned; see "Mac OS X ABI
// Function Call Guide".
« runtime/vm/os.h ('K') | « runtime/vm/os_linux.cc ('k') | runtime/vm/os_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698