Commit 078c903c authored by Per Cederqvist's avatar Per Cederqvist
Browse files

Memory leak. Better support for shutdown messages.

parent 7082c64a
......@@ -34,6 +34,7 @@
#include "config.h"
#include "exp.h"
#include "memory.h"
#include "internal-connections.h"
Kom_err kom_errno;
u_long err_stat;
......@@ -131,6 +132,11 @@ init_data_base(const char *dbase_dir)
{
restart_kom("init_data_base: Kan ej skapa m|ten\n");
}
s_clear(&a);
s_clear(&b);
s_clear(&c);
s_clear(&d);
}
}
......@@ -200,6 +206,7 @@ main (int argc,
{
int i;
FILE *stat_file;
extern int number_of_allocated_strings(void); /* From s-string.c */
s_set_storage_management(smalloc, srealloc, sfree);
......@@ -254,6 +261,7 @@ main (int argc,
toploop();
logout_all_clients();
isc_shutdown(kom_server_mcb);
cache_sync_all();
stat_file = fopen(memusefile, "w");
......@@ -269,6 +277,9 @@ main (int argc,
dump_smalloc_counts(stat_file);
dump_alloc_counts(stat_file);
dump_cache_mem_usage(stat_file);
fprintf(stat_file, "---s-string.c:\n\tStrings: %d\n",
number_of_allocated_strings());
dump_allocated_connections(stat_file);
fclose (stat_file);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment