/[radius]/radius/lib/leakdetect.c
ViewVC logotype

Diff of /radius/lib/leakdetect.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by gray, Wed Jun 12 16:12:59 2002 UTC revision 1.3 by gray, Wed Apr 30 08:47:57 2003 UTC
# Line 1  Line 1 
1  /* This file is part of GNU RADIUS.  /* This file is part of GNU Radius.
2     Copyright (C) 2000, Sergey Poznyakoff     Copyright (C) 2000,2001,2002,2003 Sergey Poznyakoff
3        
4     This program is free software; you can redistribute it and/or modify     GNU Radius is free software; you can redistribute it and/or modify
5     it under the terms of the GNU General Public License as published by     it under the terms of the GNU General Public License as published by
6     the Free Software Foundation; either version 2 of the License, or     the Free Software Foundation; either version 2 of the License, or
7     (at your option) any later version.     (at your option) any later version.
8        
9     This program is distributed in the hope that it will be useful,     GNU Radius is distributed in the hope that it will be useful,
10     but WITHOUT ANY WARRANTY; without even the implied warranty of     but WITHOUT ANY WARRANTY; without even the implied warranty of
11     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12     GNU General Public License for more details.     GNU General Public License for more details.
13        
14     You should have received a copy of the GNU General Public License     You should have received a copy of the GNU General Public License
15     along with this program; if not, write to the Free Software Foundation,     along with GNU Radius; if not, write to the Free Software Foundation,
16     Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */     Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
17    
18  #define RADIUS_MODULE_LEAKDETECT_C  #define RADIUS_MODULE_LEAKDETECT_C
# Line 39  struct mallocstat mallocstat; Line 39  struct mallocstat mallocstat;
39  #endif  #endif
40    
41  void *  void *
42  radxmalloc(size)  radxmalloc(size_t size)
         size_t size;  
43  {  {
44          char *p;          char *p;
45    
# Line 65  radxmalloc(size) Line 64  radxmalloc(size)
64  }  }
65    
66  void *  void *
67  radxrealloc(ptr, size)  radxrealloc(void *ptr, size_t size)
         void *ptr;  
         size_t size;  
68  {  {
69          if (!ptr)          if (!ptr)
70                  return radxmalloc(size);                  return radxmalloc(size);
# Line 94  radxrealloc(ptr, size) Line 91  radxrealloc(ptr, size)
91  }  }
92    
93  void *  void *
94  emalloc(size)  emalloc(size_t size)
         size_t size;  
95  {  {
96          char *p;          char *p;
97    
# Line 108  emalloc(size) Line 104  emalloc(size)
104  }  }
105    
106  void *  void *
107  erealloc(ptr, size)  erealloc(void *ptr, size_t size)
         void *ptr;  
         size_t size;  
108  {  {
109          ptr = radxrealloc(ptr, size);          ptr = radxrealloc(ptr, size);
110          if (!ptr) {          if (!ptr) {
# Line 121  erealloc(ptr, size) Line 115  erealloc(ptr, size)
115  }  }
116    
117  void  void
118  efree(ptr)  efree(void *ptr)
         void *ptr;  
119  {  {
120  #ifdef LEAK_DETECTOR  #ifdef LEAK_DETECTOR
121          MHDR *mhdr;          MHDR *mhdr;
# Line 146  efree(ptr) Line 139  efree(ptr)
139  }  }
140    
141  char *  char *
142  estrdup(s)  estrdup(char *s)
         char *s;  
143  {  {
144          char *p;          char *p;
145                    

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26