Next: , Previous: , Up: ascii zero   [Contents][Index]


7.2.5 Dynamic memory allocation for ASCII strings

Function: ccmem_asciiz_t ccmem_asciiz_malloc (cce_destination_t L, ccmem_allocator_t const * A, size_t len)

Use the given allocator to allocate enough memory to hold len characters, plus the terminating zero, and return a new instance referencing the memory. If an error occurs: raise an exception by performing a non–local exit to L. Make sure that the returned string is zero terminated.

Function: ccmem_asciiz_t ccmem_asciiz_realloc (cce_destination_t L, ccmem_allocator_t const * A, ccmem_asciiz_t S, size_t newlen)

Use the given allocator to reallocate the memory referenced by S to a new size; newlen is meant not to include the terminating zero. Return a new instance referencing the reallocated memory. If an error occurs: raise an exception by performing a non–local exit to L. Make sure that the returned string is zero terminated.

Function: void ccmem_asciiz_free (ccmem_allocator_t const * A, ccmem_asciiz_t S)

Use the given allocator to release the memory referenced by S.


Next: , Previous: , Up: ascii zero   [Contents][Index]

This document describes version 0.2.2-devel.3 of CCMemory.