runic_obj_t runic_alloc_atom(runic_t* r, size_t sz);¶
The above function signature outlines the operation regarding allocating an ATOM with a size equal to 1 byte plus the size as specified by sz. ATOM cannot be resized, so choose the size wisely, or simply use runic_obj_t runic_alloc_atom_str().
Arguments:¶
r – A
runic_tobject that was returned as a result of a successful open operation. Attempting to use any other object is an invalid operation. The program will almost certainly return an invalidrunic_obj_t. Attempting to allocate objects with invalidrunic_tobjects is not encouraged.sz – A value greater than zero, but less than 255. Using larger value will cause this operation to fail, print to console, and return an invalid
runic_obj_t.
Returns:¶
A runic_obj_t object which is of type ATOM and is equal in bytes to sz + 1. In the event that file memory is full, no objects can be garbage collected, and there is no additional disk space, this operation may fail. If so, the runic_obj_t returned will have an offset of 0 and a base pointer equal to NULL.