1N/A * Copyright (c) 2000-2001, 2003 Sendmail, Inc. and its suppliers. 1N/A * All rights reserved. 1N/A * By using this file, you agree to the terms and conditions set 1N/A * forth in the LICENSE file which can be found at the top level of 1N/A * the sendmail distribution. 1N/A * $Id: rpool.h,v 1.16 2003/09/05 23:07:49 ca Exp $ 1N/A#
pragma ident "%Z%%M% %I% %E% SMI" 1N/A** libsm resource pools 1N/A** Each memory pool object consists of an SM_POOLLINK_T, 1N/A** followed by a platform specific amount of padding, 1N/A** followed by 'poolsize' bytes of pool data, 1N/A** where 'poolsize' is the value of rpool->sm_poolsize at the time 1N/A** the pool is allocated. 1N/A ** Function for freeing this resource. It may be NULL, 1N/A ** meaning that this resource has already been freed. 1N/A /* Points to SmRpoolMagic, or is NULL if rpool is freed. */ 1N/A ** If this rpool object has no parent, then sm_parentlink 1N/A ** is NULL. Otherwise, we set *sm_parentlink = NULL 1N/A ** when this rpool is freed, so that it isn't freed a 1N/A ** second time when the parent is freed. 1N/A /* Size of the next pool to be allocated, not including the header. */ 1N/A ** If an sm_rpool_malloc_x request is too big to fit 1N/A ** in the current pool, and the request size > bigobjectsize, 1N/A ** then the object will be given its own malloc'ed block. 1N/A ** sm_bigobjectsize <= sm_poolsize. The maximum wasted space 1N/A ** at the end of a pool is maxpooledobjectsize - 1. 1N/A /* Points to next free byte in the current pool. */ 1N/A ** Number of bytes available in the current pool. 1N/A ** Initially 0. Set to 0 by sm_rpool_free. 1N/A /* Linked list of memory pools. Initially NULL. */ 1N/A ** Number of available resource slots in current list. 1N/A ** Initially 0. Set to 0 by sm_rpool_free. 1N/A /* Linked list of resource lists. Initially NULL. */ 1N/A#
endif /* _FFR_PERF_RPOOL */ 1N/A#
else /* SM_HEAP_CHECK */ 1N/A#
endif /* SM_HEAP_CHECK */ 1N/A#
else /* DO_NOT_USE_STRCPY */ 1N/A#
endif /* DO_NOT_USE_STRCPY */ 1N/A#
endif /* ! SM_RPOOL_H */