]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/lib/smartall.h
kes If doing a mount, look for a slot, and if specified pass it to
[bacula/bacula] / bacula / src / lib / smartall.h
index c646888abea80449455e91808dcef5faf4ea6e1b..439f990ea148011e1ff3b67bcbee330fec8d9965 100644 (file)
@@ -1,35 +1,30 @@
 /*
 
-       Definitions for the smart memory allocator
+        Definitions for the smart memory allocator
 
      Version $Id$
 
 */
 
 /*
-   Copyright (C) 2000-2004 Kern Sibbald and John Walker
+   Copyright (C) 2000-2006 Kern Sibbald
 
    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.
+   modify it under the terms of the GNU General Public License
+   version 2 as amended with additional clauses defined in the
+   file LICENSE in the main source directory.
 
    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.
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 
+   the file LICENSE for additional details.
 
  */
 
-extern uint64_t sm_max_bytes;
-extern uint64_t sm_bytes;
-extern uint32_t sm_max_buffers;
-extern uint32_t sm_buffers;
+extern uint64_t DLL_IMP_EXP sm_max_bytes;
+extern uint64_t DLL_IMP_EXP sm_bytes;
+extern uint32_t DLL_IMP_EXP sm_max_buffers;
+extern uint32_t DLL_IMP_EXP sm_buffers;
 
 #ifdef  SMARTALLOC
 #undef  SMARTALLOC
@@ -37,15 +32,15 @@ extern uint32_t sm_buffers;
 
 
 extern void *sm_malloc(const char *fname, int lineno, unsigned int nbytes),
-           *sm_calloc(const char *fname, int lineno,
-               unsigned int nelem, unsigned int elsize),
-           *sm_realloc(const char *fname, int lineno, void *ptr, unsigned int size),
-           *actuallymalloc(unsigned int size),
-           *actuallycalloc(unsigned int nelem, unsigned int elsize),
-           *actuallyrealloc(void *ptr, unsigned int size);
+            *sm_calloc(const char *fname, int lineno,
+                unsigned int nelem, unsigned int elsize),
+            *sm_realloc(const char *fname, int lineno, void *ptr, unsigned int size),
+            *actuallymalloc(unsigned int size),
+            *actuallycalloc(unsigned int nelem, unsigned int elsize),
+            *actuallyrealloc(void *ptr, unsigned int size);
 extern void sm_free(const char *fname, int lineno, void *fp);
 extern void actuallyfree(void *cp),
-           sm_dump(bool bufdump), sm_static(int mode);
+            sm_dump(bool bufdump), sm_static(int mode);
 extern void sm_new_owner(const char *fname, int lineno, char *buf);
 
 #ifdef SMCHECK
@@ -142,19 +137,19 @@ class SMARTALLOC
    public:
       void *operator new(size_t s)
       {
-         return malloc(s);
+          return malloc(s);
       }
       void *operator new[](size_t s)
       {
-         return malloc(s);
+          return malloc(s);
       }
       void  operator delete(void *ptr)
       {
-         free(ptr);
+          free(ptr);
       }
       void  operator delete[](void *ptr, size_t i)
       {
-         free(ptr);
+          free(ptr);
       }
 };
 #endif