Ignore:
Timestamp:
Nov 4, 2008, 4:25:19 AM (17 years ago)
Author:
bird
Message:

kmk: some MBs of memory during building by freeing up the chopped up command lines after we're done with them. (Code not perfect, but wtf., it saves me 7 MBs (out of 45), a bunch of faults and turns out to using less cpu time...)

File:
1 edited

Legend:

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

    r1993 r2056  
    584584      if (f->cmds == 0)
    585585        {
     586#ifndef CONFIG_WITH_ALLOC_CACHES
    586587          f->cmds = xmalloc (sizeof (struct commands));
     588#else
     589          f->cmds = alloccache_alloc (&commands_cache);
     590#endif
    587591          f->cmds->fileinfo.filenm = 0;
    588592          f->cmds->commands = s[1];
    589593          f->cmds->command_lines = 0;
     594#ifdef CONFIG_WITH_MEMORY_OPTIMIZATIONS
     595          f->cmds->refs = 1000;
     596#endif
    590597        }
    591598    }
Note: See TracChangeset for help on using the changeset viewer.