GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
KMALLOC(3) FreeBSD Library Functions Manual KMALLOC(3)

kasprintf, kcalloc, kmalloc, krealloc, kreallocarray, kstrdup, kvasprintf
memory allocation functions for kcgi

library “libkcgi”

#include <sys/types.h>
#include <stdarg.h>
#include <stdint.h>
#include <kcgi.h>

int
kasprintf(char **p, const char *fmt, ...);

void *
kcalloc(size_t nm, size_t sz);

void *
kmalloc(size_t sz);

void *
krealloc(void *p, size_t sz);

void *
kreallocarray(void *p, size_t nm, size_t sz);

char *
kstrdup(const char *cp);

int
kvasprintf(char **p, const char *fmt, va_list ap);

These functions wrap around corresponding libc versions except that on allocation failure, they print a warning message to standard error output and call exit(3).

Calling kcalloc(), kmalloc(), krealloc(), or kreallocarray() with sz or nm equal to zero, or passing NULL to kstrdup(), additionally prints a warning message to the standard error output and produces non-portable results.

kcgi(3)

These functions were written by Kristaps Dzonsons <kristaps@bsd.lv>.
June 12, 2022 FreeBSD 13.1-RELEASE

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.