⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 arrfree.3

📁 speech signal process tools
💻 3
字号:
.\" Copyright (c) 1987 Entropic Speech, Inc.  All rights reserved..\" @(#)arrfree.3	1.5  30 Apr 1997  ESI.TH ARR_FREE 3\-ESPSu 30 Apr 1997.ds ]W "\fI\s+4\ze\h'0.05'e\s-4\v'-0.4m'\fP\(*p\v'0.4m'\ Entropic Speech, Inc..SH NAMEarr_free \- free storage allocated by arr_alloc or marg_index.SH SYNOPSIS.nf.ft B#include <esps/esps.h>voidarr_free(arr, rk, typ, lvl)char    *arr;int     rk, typ, lvl;.fi.ft.SH DESCRIPTION.PP.I arr_freeuses.IR free (3C)to free storage allocated by.IR arr_alloc (3\-ESPSu)or.IR marg_index (3\-ESPSu)..PPIf.I arris the result of an invocation of.IR arr_alloc (3\-ESPSu),say.IParr = arr_alloc(rk, dim, typ, lvl);.PPthen calling.IParr_free(arr, rk, typ, lvl);.PPwith the same values of.I rk,.I typ,and.I lvlwill free the storage.Both the storage for array elements and the pointer structure thatsupports indexing are freed..PPUsually the result of.I arr_allocwill have been converted to a type other than (char *) before beingused.For example, with.IR rk " = 3,".IR typ " = FLOAT,"and.IR lvl " = 1,"the appropriate type would be (float ****), and instead of the above,.I arrwould be defined by.IParr = (float ****) arr_alloc(3, dim, FLOAT, 1);.PPThis must then be converted back to (char *) in the invocation of.I arr_free,as in.IParr_free((char *) arr, 3, FLOAT, 1);.sp 0.3.PPIf.I arris the result of an invocation of.IR marg_index (3\-ESPSu)of the form.IParr = marg_index(p, rk, dim, typ, lvl);.PPthen calling.IParr_free(arr, rk, typ, lvl);.PPwill free the storage for the pointer structure created by.I marg_indexand will also attempt to free the storage that.I ppoints to.This will work only if.I pis a pointer returned by.IR malloc (3C)or.IR calloc (3C);the result will be disaster otherwise..PPIf.I pdoes not point to a block allocated by.I mallocor.I calloc,it is still possible to free the pointer structure created by.I marg_index,but leave the storage that.I ppoints to alone.To do this, replace.I rkby.IR rk " \- 1"and.I lvlby.IR lvl " + 1"in the invocation of.I arr_free..PP.I marg_index,like.I arr_alloc,returns a pointer that is likely to be converted to another type foruse and require conversion back to (char *) when.I arr_freeis called.For example, after.IParr = (float ****) marg_index(p, 3, dim, FLOAT, 1);.PPthe statement.IParr_free((char *) arr, 3, FLOAT, 1);.PPwill free the storage allocated by.I marg_indexand will execute.I free(p);as well.The statement.IParr_free((char *) arr, 2, FLOAT, 2);.PPwill free only the storage allocated by.I marg_index..SH "SEE ALSO".PP\fIarr_alloc\fR(3\-ESPSu), \fImarg_index\fR(3\-ESPSu), free(3C).SH DIAGNOSTICS.PP.nfarr_free: rank < 0arr_free: level < 0arr_free: unrecognized type.fi.SH BUGS.PPNone known..SH AUTHORRodney Johnson

⌨️ 快捷键说明

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