/*
Bacula® - The Network Backup Solution
- Copyright (C) 2000-2007 Free Software Foundation Europe e.V.
+ Copyright (C) 2000-2008 Free Software Foundation Europe e.V.
The main author of Bacula is Kern Sibbald, with contributions from
many others, a complete list can be found in the file AUTHORS.
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- Bacula® is a registered trademark of John Walker.
+ Bacula® is a registered trademark of Kern Sibbald.
The licensor of Bacula is the Free Software Foundation Europe
(FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
Switzerland, email:ftf@fsfeurope.org.
#define free_memory(x) sm_free_pool_memory(__FILE__, __LINE__, x)
extern void sm_free_pool_memory(const char *fname, int line, POOLMEM *buf);
-
#else
extern POOLMEM *get_pool_memory(int pool);
#endif
+/* Macro to simplify free/reset pointers */
+#define free_and_null_pool_memory(a) do{if(a){free_pool_memory(a); (a)=NULL;}} while(0)
+
extern void garbage_collect_memory_pool();
extern void close_memory_pool();
extern void print_memory_pool_stats();
int pm_strcat(POOLMEM *&pm, const char *str);
int pm_strcat(POOL_MEM &pm, const char *str);
int pm_strcat(POOLMEM *&pm, POOL_MEM &str);
+
int pm_strcpy(POOLMEM **pm, const char *str);
int pm_strcpy(POOLMEM *&pm, const char *str);
int pm_strcpy(POOL_MEM &pm, const char *str);
int pm_strcpy(POOLMEM *&pm, POOL_MEM &str);
+int pm_memcpy(POOLMEM **pm, const char *data, int32_t n);
+int pm_memcpy(POOLMEM *&pm, const char *data, int32_t n);
+int pm_memcpy(POOL_MEM &pm, const char *data, int32_t n);
+int pm_memcpy(POOLMEM *&pm, POOL_MEM &data, int32_t n);
#endif