Ignore:
Timestamp:
Oct 14, 2008, 11:46:23 AM (17 years ago)
Author:
bird
Message:

kmk: Allocation caches for nameseq, dep and idep. next: variable.

File:
1 edited

Legend:

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

    r903 r1863  
    6666
    6767
     68#ifdef CONFIG_WITH_ALLOC_CACHES
     69struct alloccache idep_cache;
     70#endif
     71
    6872/* Struct idep captures information about implicit prerequisites
    6973   that come from implicit rules. */
     
    8690    {
    8791      n = p->next;
     92#ifndef CONFIG_WITH_ALLOC_CACHES
    8893      free (p);
     94#else
     95      alloccache_free (&idep_cache, p);
     96#endif
    8997    }
    9098}
     
    254262
    255263  PATH_VAR (stem_str); /* @@ Need to get rid of stem, stemlen, etc. */
     264
     265#ifdef CONFIG_WITH_ALLOC_CACHES
     266  if (!idep_cache.size)
     267    alloccache_init (&idep_cache, sizeof(struct idep), "dep", NULL, NULL);
     268#endif
    256269
    257270#ifndef NO_ARCHIVES
     
    583596                        ;
    584597
     598#ifndef CONFIG_WITH_ALLOC_CACHES
    585599                      *id_ptr = (struct idep *)
    586600                        multi_glob (
     
    589603                                          sizeof (struct idep),
    590604                                          1), sizeof (struct idep));
     605#else
     606                      *id_ptr = (struct idep *)
     607                        multi_glob (
     608                          parse_file_seq (&p2,
     609                                          order_only ? '\0' : '|',
     610                                          &idep_cache, 1),
     611                          &idep_cache);
     612#endif
    591613
    592614                      /* @@ It would be nice to teach parse_file_seq or
Note: See TracChangeset for help on using the changeset viewer.