/*++ /* NAME /* cleanup_region 3 /* SUMMARY /* queue file region manager /* SYNOPSIS /* #include "cleanup.h" /* /* void cleanup_region_init(state) /* CLEANUP_STATE *state; /* /* CLEANUP_REGION *cleanup_region_open(state, space_needed) /* CLEANUP_STATE *state; /* ssize_t space_needed; /* /* int cleanup_region_close(state, rp) /* CLEANUP_STATE *state; /* CLEANUP_REGION *rp; /* /* CLEANUP_REGION *cleanup_region_return(state, rp) /* CLEANUP_STATE *state; /* CLEANUP_REGION *rp; /* /* void cleanup_region_done(state) /* CLEANUP_STATE *state; /* DESCRIPTION /* This module maintains queue file regions. Regions are created /* on-the-fly and can be reused multiple times. Each region /* structure consists of a file offset, a length (0 for an /* open-ended region at the end of the file), a write offset /* (maintained by the caller), and list linkage. Region /* boundaries are not enforced by this module. It is up to the /* caller to ensure that they stay within bounds. /* /* cleanup_region_init() performs mandatory initialization and /* overlays an initial region structure over an already existing /* queue file. This function must not be called before the /* queue file is complete. /* /* cleanup_region_open() opens an existing region or creates /* a new region that can accommodate at least the specified /* amount of space. A new region is an open-ended region at /* the end of the file; it must be closed (see next) before /* unrelated data can be appended to the same file. /* /* cleanup_region_close() indicates that a region will not be /* updated further. With an open-ended region, the region's /* end is frozen just before the caller-maintained write offset. /* With a close-ended region, unused space (beginning at the /* caller-maintained write offset) may be returned to the free /* pool. /* /* cleanup_region_return() returns a list of regions to the /* free pool, and returns a null pointer. To avoid fragmentation, /* adjacent free regions may be coalesced together. /* /* cleanup_region_done() destroys all in-memory information /* that was allocated for administering queue file regions. /* /* Arguments: /* .IP state /* Queue file and message processing state. This state is /* updated as records are processed and as errors happen. /* .IP space_needed /* The minimum region size needed. /* LICENSE /* .ad /* .fi /* The Secure Mailer license must be distributed with this software. /* AUTHOR(S) /* Wietse Venema /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA
/*--*/
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.