📄 ne_malloc.3
字号:
.\"Generated by db2man.xsl. Don't modify this, modify the source..de Sh \" Subsection.br.if t .Sp.ne 5.PP\fB\\$1\fR.PP...de Sp \" Vertical space (when we can't use .PP).if t .sp .5v.if n .sp...de Ip \" List item.br.ie \\n(.$>=3 .ne \\$3.el .ne 3.IP "\\$1" \\$2...TH "NE_MALLOC" 3 "5 July 2004" "neon 0.24.7" "neon API reference".SH NAMEne_malloc, ne_calloc, ne_realloc, ne_strdup, ne_strndup, ne_oom_callback \- memory allocation wrappers.SH "SYNOPSIS".ad l.hy 0#include <ne_alloc\&.h>.sp.HP 17void\ *\fBne_malloc\fR\ (size_t\ \fIsize\fR);.HP 17void\ *\fBne_calloc\fR\ (size_t\ \fIsize\fR);.HP 18void\ *\fBne_realloc\fR\ (void\ *\fIsize\fR, size_t\ \fIlen\fR);.HP 17char\ *\fBne_strdup\fR\ (const\ char\ *\fIs\fR, size_t\ \fIsize\fR);.HP 18char\ *\fBne_strndup\fR\ (const\ char\ *\fIs\fR, size_t\ \fIsize\fR);.HP 22void\ \fBne_oom_callback\fR\ (void\ (*\fIcallback\fR)(void));.ad.hy.SH "DESCRIPTION".PPThe functions \fBne_malloc\fR, \fBne_calloc\fR, \fBne_realloc\fR, \fBne_strdup\fR and \fBne_strdnup\fR provide wrappers for the equivalent functions in the standard C library\&. The wrappers provide the extra guarantee that if the C library equivalent returns NULL when no memory is available, an optional callback will be called, and the library will then call \fBabort\fR()\&..PP\fBne_oom_callback\fR registers a callback which will be invoked if an out of memory error is detected\&..SH "NOTES".PPIf the operating system uses optimistic memory allocation, the C library memory allocation routines will not return NULL, so it is not possible to gracefully handle memory allocation failures\&..SH AUTHORJoe Orton <neon@webdav\&.org>.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -