1.\" # 2.\" # Copyright (c) 2014, Juniper Networks, Inc. 3.\" # All rights reserved. 4.\" # This SOFTWARE is licensed under the LICENSE provided in the 5.\" # ../Copyright file. By downloading, installing, copying, or 6.\" # using the SOFTWARE, you agree to be bound by the terms of that 7.\" # LICENSE. 8.\" # Phil Shafer, July 2014 9.\" 10.Dd December 4, 2014 11.Dt LIBXO 3 12.Os 13.Sh NAME 14.Nm xo_set_allocator 15.Nd set allocation functions for libxo 16.Sh LIBRARY 17.Lb libxo 18.Sh SYNOPSIS 19.In libxo/xo.h 20.Sy typedef void *(*xo_realloc_func_t)(void *, size_t); 21.Pp 22.Sy typedef void (*xo_free_func_t)(void *); 23.Ft void 24.Fn xo_set_allocator "xo_realloc_func_t realloc_func" "xo_free_func_t free_func" 25.Sh DESCRIPTION 26The 27.Fn xo_set_allocator 28function allows 29.Nm libxo 30to be used in environments 31where the standard 32.Xr realloc 3 33and 34.Xr free 3 35functions are not available. 36.Pp 37.Fa realloc_func 38should expect the same arguments as 39.Xr realloc 3 40and return 41a pointer to memory following the same convention. 42.Fa free_func 43will receive the same argument as 44.Xr free 3 45and should release it, as appropriate for the environment. 46.Pp 47By default, the standard 48.Xr realloc 3 49and 50.Xr free 3 51functions are used. 52.Sh SEE ALSO 53.Xr xo_emit 3 , 54.Xr libxo 3 55.Sh HISTORY 56The 57.Nm libxo 58library first appeared in 59.Fx 11.0 . 60.Sh AUTHORS 61.Nm libxo 62was written by 63.An Phil Shafer Aq Mt phil@freebsd.org . 64 65