hcreate.3 (268943) | hcreate.3 (292767) |
---|---|
1.\"- 2.\" Copyright (c) 1999 The NetBSD Foundation, Inc. 3.\" All rights reserved. 4.\" 5.\" This code is derived from software contributed to The NetBSD Foundation 6.\" by Klaus Klein. 7.\" 8.\" Redistribution and use in source and binary forms, with or without --- 12 unchanged lines hidden (view full) --- 21.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27.\" POSSIBILITY OF SUCH DAMAGE. 28.\" | 1.\"- 2.\" Copyright (c) 1999 The NetBSD Foundation, Inc. 3.\" All rights reserved. 4.\" 5.\" This code is derived from software contributed to The NetBSD Foundation 6.\" by Klaus Klein. 7.\" 8.\" Redistribution and use in source and binary forms, with or without --- 12 unchanged lines hidden (view full) --- 21.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27.\" POSSIBILITY OF SUCH DAMAGE. 28.\" |
29.\" $FreeBSD: head/lib/libc/stdlib/hcreate.3 268943 2014-07-21 15:22:48Z pfg $ | 29.\" $FreeBSD: head/lib/libc/stdlib/hcreate.3 292767 2015-12-27 07:50:11Z ed $ |
30.\" | 30.\" |
31.Dd July 21, 2014 | 31.Dd December 26, 2015 |
32.Dt HCREATE 3 33.Os 34.Sh NAME 35.Nm hcreate , 36.Nm hcreate_r , 37.Nm hdestroy , 38.Nm hdestroy_r , 39.Nm hsearch , --- 31 unchanged lines hidden (view full) --- 71function allocates sufficient space for the table, and the application should 72ensure it is called before 73.Fn hsearch 74is used. 75The 76.Fa nel 77argument is an estimate of the maximum 78number of entries that the table should contain. | 32.Dt HCREATE 3 33.Os 34.Sh NAME 35.Nm hcreate , 36.Nm hcreate_r , 37.Nm hdestroy , 38.Nm hdestroy_r , 39.Nm hsearch , --- 31 unchanged lines hidden (view full) --- 71function allocates sufficient space for the table, and the application should 72ensure it is called before 73.Fn hsearch 74is used. 75The 76.Fa nel 77argument is an estimate of the maximum 78number of entries that the table should contain. |
79This number may be adjusted upward by the 80algorithm in order to obtain certain mathematically favorable circumstances. | 79As this implementation resizes the hash table dynamically, 80this argument is ignored. |
81.Pp 82The 83.Fn hdestroy 84function disposes of the search table, and may be followed by another call to 85.Fn hcreate . 86After the call to 87.Fn hdestroy , 88the data can no longer be considered accessible. --- 180 unchanged lines hidden (view full) --- 269.Fn hcreate_r , 270.Fn hsearch 271and 272.Fn hsearch_r 273functions will fail if: 274.Bl -tag -width Er 275.It Bq Er ENOMEM 276Insufficient memory is available. | 81.Pp 82The 83.Fn hdestroy 84function disposes of the search table, and may be followed by another call to 85.Fn hcreate . 86After the call to 87.Fn hdestroy , 88the data can no longer be considered accessible. --- 180 unchanged lines hidden (view full) --- 269.Fn hcreate_r , 270.Fn hsearch 271and 272.Fn hsearch_r 273functions will fail if: 274.Bl -tag -width Er 275.It Bq Er ENOMEM 276Insufficient memory is available. |
277.It Bq Er EINVAL 278A table already exists. | |
279.El 280.Pp 281The 282.Fn hsearch 283and 284.Fn hsearch_r 285functions will also fail if the action is 286.Dv SEARCH --- 41 unchanged lines hidden --- | 277.El 278.Pp 279The 280.Fn hsearch 281and 282.Fn hsearch_r 283functions will also fail if the action is 284.Dv SEARCH --- 41 unchanged lines hidden --- |