Пример #1
0
void lwgeom_init_allocators()
{
	/*
	 * Any program linked into liblwgeom *MUST* have a function called lwgeom_init_allocators()
	 * defined. The first time that a memory allocation is required, liblwgeom calls this function
	 * to enable the user to setup their own functions for lwalloc/lwfree. Hence when being called
	 * from PostGIS we can ensure we use palloc/pfree for all memory requests rather than the
	 * system memory management calls.
	 *
	 * Since using the standard malloc/free is likely to be a common option, liblwgeom contains a
	 * function called lwgeom_install_default_allocators() which sets this up for you. Hence most
	 * people will only ever need this line within their lwgeom_init_allocations() function.
	 */

	lwgeom_install_default_allocators();
}
Пример #2
0
/**
 * Set up liblwgeom to run in stand-alone mode using the
 * usual system memory handling functions.
 */
void lwgeom_init_allocators(void)
{
	/* liblwgeom callback - install default handlers */
	lwgeom_install_default_allocators();
}
Пример #3
0
/* liblwgeom allocator callback - install the defaults (malloc/free/stdout/stderr) */
void lwgeom_init_allocators()
{
	lwgeom_install_default_allocators();
}