Initializing help system before first use

bindrv_setalloc

Purpose
Define a memory allocator for string buffers.
Synopsis
void bindrv_setalloc(s_bindrvctx bctx, void* (*memalloc)(size_t,void*), void* mctx);
Arguments
bctx 
A BinDrv reader context
memalloc 
A memory allocator or NULL
mctx 
Context to be passed as the last argument of mamalloc
Further information
1. When reading a string, the function bindrv_getstring allocates a buffer that it returns. By default the C function malloc is used for this memory allocation. This routine allows to set an alternative function for this task: the provided function takes as argument the size of the buffer to allocate as well as some context pointer mctx.
2. Using NULL as the function pointer restores the default memory allocator, namely the C function malloc.
Related topics

© 2001-2024 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.