t_free.3xti

来自「<B>Digital的Unix操作系统VAX 4.2源码</B>」· 3XTI 代码 · 共 92 行

3XTI
92
字号
.TH t_free 3xti.SH Namet_free \- free a library structure .SH Syntax.B #include <xti.h>.br.sp 1.B int t_free(\fIptr, struct_type\fB).br.B char \fI*ptr\fB;.br.B int \fIstruct_type\fB;.SH Arguments.IP \fIptr\fR 10Points to one of the seven structure types described for.PN t_alloc()..IP \fIstruct_type\fR 10Identifies the type of that structure, which must be one of thefollowing:.IP .EXT_BIND_STR		\fIstruct\fP	\fBt_bind\fP;T_CALL_STR		\fIstruct\fP	\fBt_call\fPT_OPTMGMT_STR		\fIstruct\fP	\fBt_optmgmt\fPT_DIS_STR       	\fIstruct\fP	\fBt_discon\fPT_UNITDATA_STR	\fIstruct\fP	\fBt_unitdata\fPT_UDERROR_STR		\fIstruct\fP	\fBt_uderr\fPT_INFO_STR		\fIstruct\fP	\fBt_info\fP.EE.IPEach of these structures is used as an argument to one or moretransport functions..SH DescriptionThe .PN t_free()function frees memory previously allocated by.PN t_alloc()\fR.\fRThis function frees memory for the specifiedstructure and also frees memory for buffers referenced by thestructure..NXR "t_free system call".NXR "memory" "freeing".NXA "t_free system call" "t_alloc system call".PP.TStab(@);lfHB lfHB lfHBlfR  lfR  lfR ._.sp 4pParameters@Before Call@After Call.sp 4p_.sp 6pptr@x@/struct_type@x@/.sp 6p_.TE.PP.sp 12pThe .PN t_free()function checks the \fIaddr\fR, \fIopt\fR, and\fIudata\fR fields of the given structure (as appropriate) and free thebuffers pointed to by the \fIbuf\fR field of the \fBnetbuf\fR structure.If \fIbuf\fR is NULL, .PN t_free()does not attempt to free memory.After all buffers are freed, .PN t_free()frees the memory associated with the structure pointed to by \fIptr\fR..PPResults are undefined if \fIptr\fR or any of the \fIbuf\fRpointers points to a block of memory not previously allocatedby .PN t_alloc()\fR.\fR.SH Return ValuesUpon successful completion, a value of 0 is returned. On failure,  avalue of \-1 is returned, and \fBt_errno\fR is set to indicate theerror..SH DiagnosticsOn failure, \fBt_errno\fR is set to one of the following:.TP 20[TNOTSUPPORT]This function is not supported by the current implementation of XTI. .TP 20[TSYSERR]A system error has occurred during execution of this function..SH See Alsot_alloc(3xti)

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?