URL: http://www.firstbasesoftware.com/man/man3/mkstr.htm
Last modified: 12 September 1995
Copyright © by FirstBase Software.
[
Index of Contents] [
FirstBase RDBMS Overview]
The address passed in, addr, will first be deallocated using free(3). Note: Because of this attempt at freeing previous memory allocations, addr must be equal to NULL for the first call to fb_mkstr.
After any old memory is freed, new space is allocated using malloc(3) and tied to addr. The new memory is made to fit exactly the length of the passed in string, s.
Once the space is allocated, the string s is copied into the
new address space, and a pointer to the new space is returned.