]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/lib/mem_pool.h
kes Correctly detect Ubuntu systems, and add ubuntu platform directory.
[bacula/bacula] / bacula / src / lib / mem_pool.h
index ee4dfbbbe61a4baa3e3d011d59cfa514d0bcc760..cd8dcad6d0dcca8a92ff722ddab8f9f60e681d27 100644 (file)
@@ -1,28 +1,36 @@
 /*
- * Memory Pool prototypes
- *
- *  Kern Sibbald, MM
- *
- *   Version $Id$
- */
-/*
-   Copyright (C) 2000-2004 Kern Sibbald and John Walker
+   Bacula® - The Network Backup Solution
 
-   This program is free software; you can redistribute it and/or
-   modify it under the terms of the GNU General Public License as
-   published by the Free Software Foundation; either version 2 of
-   the License, or (at your option) any later version.
+   Copyright (C) 2000-2007 Free Software Foundation Europe e.V.
 
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   The main author of Bacula is Kern Sibbald, with contributions from
+   many others, a complete list can be found in the file AUTHORS.
+   This program is Free Software; you can redistribute it and/or
+   modify it under the terms of version two of the GNU General Public
+   License as published by the Free Software Foundation and included
+   in the file LICENSE.
+
+   This program is distributed in the hope that it will be useful, but
+   WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
    General Public License for more details.
 
-   You should have received a copy of the GNU General Public
-   License along with this program; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
-   MA 02111-1307, USA.
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+   02110-1301, USA.
 
+   Bacula® is a registered trademark of John Walker.
+   The licensor of Bacula is the Free Software Foundation Europe
+   (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
+   Switzerland, email:ftf@fsfeurope.org.
+*/
+/*
+ * Memory Pool prototypes
+ *
+ *  Kern Sibbald, MM
+ *
+ *   Version $Id$
  */
 
 #ifndef __MEM_POOL_H_
@@ -63,6 +71,7 @@ extern void   free_pool_memory(POOLMEM *buf);
 
 #endif
 
+extern void garbage_collect_memory_pool();
 extern void  close_memory_pool();
 extern void  print_memory_pool_stats();
 
@@ -82,6 +91,7 @@ public:
    POOL_MEM(int pool) { mem = get_pool_memory(pool); *mem = 0; }
    ~POOL_MEM() { free_pool_memory(mem); mem = NULL; }
    char *c_str() const { return mem; }
+   POOLMEM *&addr() { return mem; }
    int size() const { return sizeof_pool_memory(mem); }
    char *check_size(int32_t size) {
       mem = check_pool_memory_size(mem, size);
@@ -93,14 +103,14 @@ public:
    int strcat(const char *str);
 };
 
-int pm_strcat (POOLMEM **pm, const char *str);
-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_strcat(POOLMEM **pm, const char *str);
+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);
 
 
 #endif