?? alloc.3
字號:
.TH alloc 3.SH NAMEalloc \- allocate memory.SH SYNTAX.B #include <alloc.h>char *\fBalloc\fP(\fInew\fR);void \fBalloc_free\fP(\fIx\fR);void \fBalloc_re\fP(&\fIx\fR,\fIold\fR,\fInew\fR);char *\fIx\fR;.brunsigned int \fIold\fR;.brunsigned int \fInew\fR;.SH DESCRIPTION.B allocallocates enough space from the heap for.I newbytes of data,adequately aligned for any data type..I newmay be 0..B allocreturns a pointer to the space.If space is not available,.B allocreturns 0,setting.B errnoappropriately..B alloc_freereturns space to the heap..B alloc_reexpands the space allocated to.I xfrom.I oldbytes to.I newbytes.It allocates new space,copies.I oldbytes from the old space to the new space,returns the old space to the heap,and changes.I xto point to the new space.It then returns 1.If space is not available,.B alloc_rereturns 0,leaving the old space alone..SH "SEE ALSO"sbrk(2),malloc(3),error(3)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -