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

Unified 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: Review fixes 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.h
diff --git a/runtime/vm/os.h b/runtime/vm/os.h
index e33b274f7122fd2ec583676464fc8dcba59b8368..7c699c1d82d1840345aaf3d2c06e183d82fc65cd 100644
--- a/runtime/vm/os.h
+++ b/runtime/vm/os.h
@@ -40,6 +40,13 @@ class OS {
// from midnight January 1, 1970 UTC.
static int64_t GetCurrentTimeMicros();
+ // Returns an aligned pointer in the C heap with room for size bytes.
+ // Alignment must be >= 16 and a power of two.
+ static void* AlignedAllocate(intptr_t size, intptr_t alignment);
+
+ // Frees a pointer returned from AlignedAllocate.
+ static void AlignedFree(void* ptr);
+
// Returns the activation frame alignment constraint or zero if
// the platform doesn't care. Guaranteed to be a power of two.
static word ActivationFrameAlignment();

Powered by Google App Engine
This is Rietveld 408576698