malloc ( size -- alien )
Factor handbook > C library interface > Passing data between Factor and C > Manual memory management

Prev:malloc-byte-array ( byte-array -- alien )
Next:calloc ( count size -- alien )


Vocabulary
libc

Inputs and outputs
sizea non-negative integer
aliena c-ptr


Word description
Allocates a block of size bytes from the operating system. The contents of the block are undefined.

Errors
Throws an error if memory allocation failed.

Warning
Don't forget to deallocate the memory with a call to free.


Definition