Source File

LibC.hylo

Members

Functions

fun aligned_alloc(_ alignment: Int, _ size: Int) -> MemoryAddress

Allocates size bytes of uninitialized storage whose alignment is specified by alignment.

fun malloc(_ size: Int) -> MemoryAddress

Allocates size bytes of uninitialized storage.

fun free(_ pointer: MemoryAddress)

Deallocates the block of memory pointed at by pointer.

fun abort() -> Never

Terminates the program abnormally.

fun fdopen(_ descriptor: Int, _ mode: MemoryAddress) -> MemoryAddress
fun fwrite(_ data: MemoryAddress, _ size: Int, _ count: Int, _ stream: MemoryAddress) -> Int

Writes to stream the contents of data, which contains count elements of size bytes, returning the number of elements written.

fun memcpy(_ destination: MemoryAddress, _ source: MemoryAddress, _ count: Int) -> MemoryAddress

Copies count elements from the object pointed to by source to the object pointed to by destination and returns destination.

fun memmove(_ destination: MemoryAddress, _ source: MemoryAddress, _ count: Int) -> MemoryAddress

Copies count elements from the object pointed to by source to the object pointed to by destination and returns destination.