]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/lib/smartall.h
Apply Preben 'Peppe' Guldberg <peppe@wielders.org>
[bacula/bacula] / bacula / src / lib / smartall.h
index 3f202974b6c4f97b8bcb7cee1086f86cb549fe1e..98305061d5d0c34b181b60d444a90ba85570ac5a 100644 (file)
@@ -1,7 +1,7 @@
 /*
 
-        Definitions for the smart memory allocator
-  
+       Definitions for the smart memory allocator
+
      Version $Id$
 
 */
@@ -37,15 +37,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
@@ -84,7 +84,7 @@ extern int sm_check_rtn(const char *fname, int lineno, bool bufdump);
 #define sm_check_rtn(f, l, fl) 1
 
 extern void *b_malloc();
-#define malloc(x) b_malloc(__FILE__, __LINE__, (x))                  
+#define malloc(x) b_malloc(__FILE__, __LINE__, (x))
 
 
 #endif
@@ -121,7 +121,7 @@ void  operator delete(void *ptr, const char *fname, int line)
 {
    free(ptr);
 }
-void  operator delete[](void *ptr, size_t i, const char *fname, int line) 
+void  operator delete[](void *ptr, size_t i, const char *fname, int line)
 {
    free(ptr);
 }
@@ -131,7 +131,7 @@ private:
 void *operator new(size_t s) throw() { return 0; }
 void *operator new[](size_t s) throw() { return 0; }
 };
+
 
 #else
 
@@ -142,19 +142,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