next up previous contents
Next: Entry Points Up: Data Structures Previous: Linked Lists

Application-reserved ( app) member of Prospero structures

This feature is available in prospero versions Alpha.5.3 and later.

For all exported structures in Prospero visible at the library interface (except for TOKENs), there is a special member named app, which can be exploited by app lications writers. This member is a union:

	union app {
		int flg;		/* Flag or number */
		void *ptr;              /* Generic Pointer */

Each allocation/freeing package (eg: vlalloc(), vlfree(), vllfree(), vlcopy()) has a 'application freeing function specifying function' (e.g., vlappfree()) associated with it.

So, if we use the app.ptr member of the VLINK structure to point to a 'struct vlink_aux', to be freed (if non-null) with the 'vlauxlfree function, then code using the VLINK in that way will have to call: vlappfree(vlauxlfree); and then all subsequent calls to vlfree() will call vlauxlfree on the app.ptr member.

Padma Indraganti
Wed Jun 19 18:04:04 PDT 1996