X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/6d5f5cafb4c507abe36434bf7695573284eb8761..ee3c2fea18d0c940c2256c6bf041f546c703c375:/src/src/store.h diff --git a/src/src/store.h b/src/src/store.h index 52f211ef5..92deabf9b 100644 --- a/src/src/store.h +++ b/src/src/store.h @@ -3,6 +3,7 @@ *************************************************/ /* Copyright (c) University of Cambridge 1995 - 2009 */ +/* Copyright (c) The Exim Maintainers 2020 */ /* See the file NOTICE for conditions of use and distribution. */ /* Header for Exim's memory allocation functions */ @@ -12,15 +13,24 @@ /* Define symbols for identifying the store pools. */ -enum { POOL_MAIN, POOL_PERM, POOL_SEARCH, +#define NPOOLS 8 +enum { POOL_MAIN, + POOL_PERM, + POOL_SEARCH, + POOL_MESSAGE, + POOL_TAINT_BASE, - POOL_TAINT_MAIN = POOL_TAINT_BASE, POOL_TAINT_PERM, POOL_TAINT_SEARCH }; + + POOL_TAINT_MAIN = POOL_TAINT_BASE, + POOL_TAINT_PERM, + POOL_TAINT_SEARCH, + POOL_TAINT_MESSAGE }; /* This variable (the one for the current pool) is set by store_get() to its yield, and by store_reset() to NULL. This allows string_cat() to optimize its store handling. */ -extern void *store_last_get[6]; +extern void *store_last_get[NPOOLS]; /* This variable contains the current store pool number. */ @@ -34,10 +44,7 @@ tracing information for debugging. */ #define store_free(addr) \ store_free_3(addr, __FUNCTION__, __LINE__) -#define store_get(size, tainted) \ - store_get_3(size, tainted, __FUNCTION__, __LINE__) -#define store_get_perm(size, tainted) \ - store_get_perm_3(size, tainted, __FUNCTION__, __LINE__) +/* store_get & store_get_perm are in local_scan.h */ #define store_malloc(size) \ store_malloc_3(size, __FUNCTION__, __LINE__) #define store_mark(void) \ @@ -47,7 +54,7 @@ tracing information for debugging. */ #define store_release_above(addr) \ store_release_above_3(addr, __FUNCTION__, __LINE__) #define store_reset(mark) \ - store_reset_3(mark, store_pool, __FUNCTION__, __LINE__) + store_reset_3(mark, __FUNCTION__, __LINE__) /* The real functions */ @@ -55,13 +62,12 @@ typedef void ** rmark; extern BOOL store_extend_3(void *, BOOL, int, int, const char *, int); extern void store_free_3(void *, const char *, int); -extern void *store_get_3(int, BOOL, const char *, int) ALLOC ALLOC_SIZE(1) WARN_UNUSED_RESULT; -extern void *store_get_perm_3(int, BOOL, const char *, int) ALLOC ALLOC_SIZE(1) WARN_UNUSED_RESULT; +/* store_get_3 & store_get_perm_3 are in local_scan.h */ extern void *store_malloc_3(int, const char *, int) ALLOC ALLOC_SIZE(1) WARN_UNUSED_RESULT; extern rmark store_mark_3(const char *, int); extern void *store_newblock_3(void *, BOOL, int, int, const char *, int); extern void store_release_above_3(void *, const char *, int); -extern rmark store_reset_3(rmark, int, const char *, int); +extern rmark store_reset_3(rmark, const char *, int); #endif /* STORE_H */