Low-level file writing in Swift?

allocate(capacity:) ends up calling malloc(3), which is 16-byte aligned on most modern 64-bit systems.