Changeset 2754 for trunk/src/kmk/job.c


Ignore:
Timestamp:
Jan 24, 2015, 12:00:41 AM (10 years ago)
Author:
bird
Message:

kmk: Save 20+ MB of memory for chopped receipt command lines by freeing them after we're done evaluating a target.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kmk/job.c

    r2592 r2754  
    10161016  child->file->cmds->refs--;
    10171017  if (   !child->file->intermediate
    1018       && !child->file->pat_variables
    1019       && child->file->cmds->refs == 0)
    1020     {
    1021       struct commands *cmds = child->file->cmds;
    1022       unsigned int i;
    1023 
    1024       for (i = 0; i < cmds->ncommand_lines; ++i)
    1025         {
    1026           free (cmds->command_lines[i]);
    1027           cmds->command_lines[i] = 0;
    1028         }
    1029       free (cmds->command_lines);
    1030       cmds->command_lines = 0;
    1031       free (cmds->lines_flags);
    1032       cmds->lines_flags = 0;
    1033       cmds->ncommand_lines = 0;
    1034     }
     1018      && !child->file->pat_variables)
     1019    free_chopped_commands(child->file->cmds);
    10351020#endif /* CONFIG_WITH_MEMORY_OPTIMIZATIONS */
    10361021
Note: See TracChangeset for help on using the changeset viewer.