Eggheads: Eggdrop memory usage

Ilkka Oksanen iao at iki.fi
Tue Jun 27 03:13:01 CST 2006


Hi Derek,

Derek Kuliäski <takeda at takeda.tk> writes:
> Hello Ilkka,
>
> What does ".status all" on the bot return?
> (not sure if this will help determining the problem - it should return
> estimates of how much memory each module uses)
>

  .status all didn't return anything suspious but while reading its
  help text I found .debug command. That command required DEBUG_MEM
  flag to be defined so I recompiled the bot. Output of .debug command
  revealed that it was misc.c file where this huge memory allocation 
  was made.

  After noticing that I changed the code so that for misc.c memory
  table was printed even the expected and real memory usage
  matched. Following line was source of my problems:

      logs = nrealloc(logs, max_logs * sizeof(log_t));

  max_logs variable comes directly from configuration file:

      set max-logs 100000     
  
  By lowering this value problem went away. I think that I have
  misundestood meaning of this variable when first started to use
  eggdrop. Couldn't it be dynamic and not user settable?

  Nice code and very good memory debug features build in, thanks.

         -ilkka
  



More information about the Eggheads mailing list