diff --git a/src/clj/coffi/mem.clj b/src/clj/coffi/mem.clj index b003216..5095a59 100644 --- a/src/clj/coffi/mem.clj +++ b/src/clj/coffi/mem.clj @@ -349,6 +349,11 @@ [type] (.byteSize ^MemoryLayout (c-layout type))) +(defn align-of + "The alignment in bytes of the given `type`." + [type] + (.byteAlignment ^MemoryLayout (c-layout type))) + (defn alloc-instance "Allocates a memory segment for the given `type`." ([type] (alloc-instance type (connected-scope)))