Subversion Repositories

?revision_form?Rev ?revision_input??revision_submit??revision_endform?

Rev 1 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1 magnus 1
/*************************************************
2
*     Exim - an Internet mail transport agent    *
3
*************************************************/
4
 
5
/* Copyright (c) University of Cambridge 1995 - 2003 */
6
/* See the file NOTICE for conditions of use and distribution. */
7
 
8
/* Header for Exim's memory allocation functions */
9
 
10
#ifndef STORE_H
11
#define STORE_H
12
 
13
/* Define symbols for identifying the two store pools. */
14
 
15
#define POOL_MAIN 0
16
#define POOL_PERM 1
17
 
18
/* This variable is set by store_get() to its yield, and by store_reset() to
19
NULL. This allows string_cat() to optimize its store handling. */
20
 
21
extern void *store_last_get;
22
 
23
/* This variable contains the current store pool number. */
24
 
25
extern int store_pool;
26
 
27
/* Macros for calling the memory allocation routines with
28
tracing information for debugging. */
29
 
30
#define store_extend(addr,old,new) \
31
  store_extend_3(addr, old, new, __FILE__, __LINE__)
32
 
33
#define store_free(addr)     store_free_3(addr, __FILE__, __LINE__)
34
#define store_get(size)      store_get_3(size, __FILE__, __LINE__)
35
#define store_get_perm(size) store_get_perm_3(size, __FILE__, __LINE__)
36
#define store_malloc(size)   store_malloc_3(size, __FILE__, __LINE__)
37
#define store_release(addr)  store_release_3(addr, __FILE__, __LINE__)
38
#define store_reset(addr)    store_reset_3(addr, __FILE__, __LINE__)
39
 
40
 
41
/* The real functions */
42
 
43
extern BOOL    store_extend_3(void *, int, int, char *, int);  /* These use */
44
extern void    store_free_3(void *, char *, int);              /* char *    */
45
extern void   *store_get_3(int, char *, int);                  /* because   */
46
extern void   *store_get_perm_3(int, char *, int);             /* the       */
47
extern void   *store_malloc_3(int, char *, int);               /* value is  */
48
extern void    store_release_3(void *, char *, int);           /* always    */
49
extern void    store_reset_3(void *, char *, int);             /* __FILE__  */
50
 
51
#endif  /* STORE_H */
52
 
53
/* End of store.h */