Main Page | Modules | Data Structures | File List | Data Fields | Related Pages

dbug_mem.c

00001 /***************************************************************************
00002  * CVSID: $Id: dbug_mem.c,v 1.3 2004/08/08 14:01:47 stefanb Exp $
00003  *
00004  * dbug_mem.c : memory debugger wrapper for MNT daemon
00005  *
00006  * Copyright (C) 2004 Stefan Bambach, <sbambach@gmx.net>
00007  *
00008  * Licensed under the GNU General Public License 2.0
00009  *
00010  * This program is free software; you can redistribute it and/or modify
00011  * it under the terms of the GNU General Public License as published by
00012  * the Free Software Foundation; either version 2 of the License, or
00013  * (at your option) any later version.
00014  *
00015  * This program is distributed in the hope that it will be useful,
00016  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00017  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018  * GNU General Public License for more details.
00019  *
00020  * You should have received a copy of the GNU General Public License
00021  * along with this program; if not, write to the Free Software
00022  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023  *
00024  **************************************************************************/
00025  
00026 #ifdef HAVE_CONFIG_H
00027 #  include <config.h>
00028 #endif
00029 
00030 #include "errmanager.h"
00031 #include "dbug_mem.h"
00032 
00033 void dbug_mem_init(void)
00034 {
00035    
00036 #ifdef MEMWATCH
00037     MSG_DEBUG("USING MEMWATCH");
00038    mwInit();
00039 #endif
00040 
00041 #ifdef DMALLOC
00042     MSG_DEBUG("USING DMALLOC");
00043     /* set the 'high' flags */
00044     //dmalloc_debug_setup("debug=0x4f4ed03,inter=100,log=/tmp/dmalloc." PACKAGE);
00045     dmalloc_message("DMALLOC started");
00046 #endif
00047 
00048 }
00049 
00050 
00051 
00052 void dbug_mem_quit(void)
00053 {
00054 
00055 #ifdef MEMWATCH
00056    mwTerm();
00057 #endif
00058    
00059 #ifdef DMALLOC
00060     dmalloc_log_stats();
00061     dmalloc_log_unfreed();
00062    dmalloc_shutdown();
00063 #endif
00064 }

Generated on Wed Mar 30 13:43:26 2005 for Mntd by  doxygen 1.3.9.1