Kannel: Open Source WAP and SMS gateway  $Revision: 5037 $
test_mem.c File Reference
#include "gwlib/gwlib.h"

Go to the source code of this file.

Functions

int main (void)
 

Function Documentation

int main ( void  )

Definition at line 66 of file test_mem.c.

References debug(), gwlib_init(), and gwlib_shutdown().

66  {
67  void *p;
68  long i;
69 
70  gwlib_init();
71 
72  p = gw_malloc(100);
73  gw_free(p);
74  gw_check_leaks();
75 
76  p = gw_malloc(100);
77  gw_check_leaks();
78  gw_free(p);
79  gw_check_leaks();
80 
81  for (i = 0; i < 1000; ++i) {
82  p = gw_malloc(100);
83  debug("", 0, "i = %ld", i);
84  }
85 
87 
88  return 0;
89 }
void debug(const char *place, int err, const char *fmt,...)
Definition: log.c:690
void gwlib_shutdown(void)
Definition: gwlib.c:94
void gwlib_init(void)
Definition: gwlib.c:78
See file LICENSE for details about the license agreement for using, modifying, copying or deriving work from this software.