HPlogo HP-UX Reference > U

uwx_register_alloc_cb(3X)

Integrity Systems Only
HP-UX 11i Version 2: December 2007 Update
» 

Technical documentation

 » Table of Contents

 » Index

NAME

uwx_register_alloc_cb() — register custom allocate and free callbacks

SYNOPSIS

#include <uwx.h> int uwx_register_alloc_cb( alloc_cballoc, free_cbfree );

DESCRIPTION

uwx_register_alloc_cb() is part of the Unwind Express Library for Integrity systems; see uwx(3X). uwx_register_alloc_cb() registers custom allocate and free callbacks for use by the Unwind Express Library.

By default, the Unwind Express Library uses malloc() and free() (see malloc(3C)) to allocate and deallocate memory dynamically as needed. Custom callback routines having the same function prototypes may be registered at any time, and take effect for subsequent unwind environments created by calls to uwx_init(). Unwind environments already created but not yet freed will not be affected by this call, so a call to uwx_free() will use the free routine that was in effect when that unwind environment was created.

Parameters

alloc

A pointer to a custom callback routine for dynamic memory allocation. This function must have the same prototype as the standard malloc() function.

free

A pointer to a custom callback routine for dynamic memory deallocation. This function must have the same prototype as the standard free() function.

RETURN VALUE

uwx_register_alloc_cb() returns UWX_OK on success. See uwx(3X) for error codes.

AUTHOR

The Unwind Express Library was developed by Hewlett-Packard.