Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

stralloc_cat(3) [debian man page]

stralloc_cat(3) 					     Library Functions Manual						   stralloc_cat(3)

NAME
stralloc_cat - append data to a stralloc SYNTAX
#include <stralloc.h> int stralloc_cat(stralloc* sato,stralloc* safrom); DESCRIPTION
stralloc_cat appends the string stored in safrom to sa. It is the same as stralloc_catb(&sato, safrom.s, safrom.len). safrom must already be allocated. The data that sa previously contained is overwritten and truncated. RETURN VALUE
1 for success, 0 on memory allocation failure. SEE ALSO
stralloc_catb(3) stralloc_cat(3)

Check Out this Related Man Page

MALLOC(3)						   BSD Library Functions Manual 						 MALLOC(3)

NAME
reallocf -- general purpose memory allocation functions LIBRARY
Utility functions from BSD systems (libbsd, -lbsd) SYNOPSIS
#include <bsd/stdlib.h> void * reallocf(void *ptr, size_t size); DESCRIPTION
The reallocf() function changes the size of the previously allocated memory referenced by ptr to size bytes. The contents of the memory are unchanged up to the lesser of the new and old sizes. If the new size is larger, the contents of the newly allocated portion of the memory are undefined. Upon success, the memory referenced by ptr is freed and a pointer to the newly allocated memory is returned. Note that reallocf() may move the memory allocation, resulting in a different return value than ptr. If ptr is NULL, the reallocf() function behaves identically to malloc() for the specified size. Upon failure, when the requested memory cannot be allocated, the passed pointer is freed to ease the problems with traditional coding styles for reallocf() causing memory leaks in libraries. RETURN VALUES
The reallocf() function returns a pointer, possibly identical to ptr, to the allocated memory if successful; otherwise a NULL pointer is returned, and errno is set to ENOMEM if the error was the result of an allocation failure. The buffer is deallocated in this case. SEE ALSO
brk(2), mmap(2), alloca(3), calloc(3), free(3), malloc(3), posix_memalign(3), realloc(3), HISTORY
The reallocf() function first appeared in FreeBSD 3.0. BSD
September 26, 2009 BSD
Man Page