'\" t .\" Title: tlsrpt_set_malloc_and_free .\" Author: Boris Lohner .\" Generator: Asciidoctor 2.0.26 .\" Date: 2026-09-01 .\" Manual: tlsrpt_set_malloc_and_free .\" Source: tlsrpt_set_malloc_and_free .\" Language: English .\" .TH "TLSRPT_SET_MALLOC_AND_FREE" "3" "2026-09-01" "tlsrpt_set_malloc_and_free" "tlsrpt_set_malloc_and_free" .ie \n(.g .ds Aq \(aq .el .ds Aq ' .ss \n[.ss] 0 .nh .ad l .de URL \fI\\$2\fP <\\$1>\\$3 .. .als MTO URL .if \n[.g] \{\ . mso www.tmac . am URL . ad l . . . am MTO . ad l . . . LINKSTYLE blue R < > .\} .SH "NAME" tlsrpt_set_malloc_and_free \- replaces the malloc implementation used within libtlsrpt .SH "SYNOPSIS" .sp #include .sp void tlsrpt_set_malloc_and_free(void* (*malloc_function)(size_t size), void (*free_function)(void *ptr)) .SH "DESCRIPTION" .sp The \f(CRtlsrpt_set_malloc_and_free\fP function replaces the malloc implementation used within libtlsrpt. The replaced malloc is used within libtlsrpt only to allocate the \f(CRstruct tlsrpt_connection_t\fP and \f(CRstruct tlsrpt_dr_t\fP structures. Other malloc calls from within the C standard library are not affected. .if n .sp .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 .B Note .ps -1 .br .sp This function must be called before any of the allocating functions \f(CRtlsrpt_open\fP and \f(CRtlsrpt_init_delivery_request\fP is called! Otherwise one malloc implementation tries to free a pointer allocated by a different malloc implementation. .sp .5v .RE .SH "RETURN VALUE" .sp The tlsrpt_set_malloc_and_free function has no return value. .SH "SEE ALSO" .sp man:tlsrpt_open[3], man:tlsrpt_init_delivery_request[3] .SH "AUTHOR" .sp Boris Lohner