VirtualBox

Changeset 1793 in kBuild for trunk/src/kmk


Ignore:
Timestamp:
Sep 19, 2008 11:30:50 PM (16 years ago)
Author:
bird
Message:

kmk: hash table adjustments.

Location:
trunk/src/kmk
Files:
5 edited

Legend:

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

    r1751 r1793  
    194194  if (second_target_expansion && strchr (name, '$') != NULL)
    195195    new->need_2nd_target_expansion = 1;
    196 #endif 
     196#endif
    197197
    198198  return new;
     
    344344/* Performs secondary target name expansion and then renames
    345345   the file using rename_file. */
    346 static void 
     346static void
    347347do_2nd_target_expansion (struct file *f)
    348348{
     
    695695# ifdef KMK
    696696      warn_undefined_variables_flag = save;
    697 # endif 
    698    
     697# endif
     698
    699699      /* Disable second target expansion now since we won't expand files
    700700         entered after this point. (saves CPU cycles in enter_file()). */
     
    11921192{
    11931193#ifdef KMK
    1194   hash_init (&files, 8192, file_hash_1, file_hash_2, file_hash_cmp);
     1194  hash_init (&files, /*65535*/ 32755, file_hash_1, file_hash_2, file_hash_cmp);
    11951195#else
    11961196  hash_init (&files, 1000, file_hash_1, file_hash_2, file_hash_cmp);
  • trunk/src/kmk/function.c

    r1727 r1793  
    118118
    119119#ifdef CONFIG_WITH_MAKE_STATS
    120 unsigned long make_stats_allocations = 0;
     120long          make_stats_allocations = 0;
    121121unsigned long make_stats_allocated = 0;
    122122unsigned long make_stats_allocated_sum = 0;
     
    36363636  if (!argv[0] || (!argv[0][0] && !argv[1]))
    36373637    {
    3638       len = sprintf (buf, "alloc-cur: %5lu %6luKB (/%3luMB)  hash: %5lu %2lu%%",
     3638      len = sprintf (buf, "alloc-cur: %5ld %6luKB (/%3luMB)  hash: %5lu %2lu%%",
    36393639                     make_stats_allocations,
    36403640                     make_stats_allocated / 1024,
     
    37133713    }
    37143714  recursive = 1;
    3715  
     3715
    37163716  file = lookup_file (argv[0]);
    37173717  if (file && file->cmds)
     
    39703970#ifdef CONFIG_WITH_DEFINED
    39713971  { STRING_SIZE_TUPLE("defined"),       1,  1,  1,  func_defined},
    3972 #endif 
     3972#endif
    39733973#ifdef CONFIG_WITH_TOUPPER_TOLOWER
    39743974  { STRING_SIZE_TUPLE("toupper"),       0,  1,  1,  func_toupper_tolower},
  • trunk/src/kmk/make.h

    r1725 r1793  
    699699
    700700#ifdef CONFIG_WITH_MAKE_STATS
    701 extern unsigned long make_stats_allocations;
     701extern long make_stats_allocations;
    702702extern unsigned long make_stats_allocated;
    703703extern unsigned long make_stats_allocated_sum;
     
    736736extern char *abspath(const char *name, char *apath);
    737737extern char *func_breakpoint(char *o, char **argv, const char *funcname);
    738 #endif 
     738#endif
  • trunk/src/kmk/strcache.c

    r1447 r1793  
    191191{
    192192#ifdef KMK
    193   hash_init (&strings, 16384, str_hash_1, str_hash_2, str_hash_cmp);
     193  hash_init (&strings, 65535, str_hash_1, str_hash_2, str_hash_cmp);
    194194#else
    195195  hash_init (&strings, 8000, str_hash_1, str_hash_2, str_hash_cmp);
  • trunk/src/kmk/variable.c

    r1752 r1793  
    421421
    422422#ifndef VARIABLE_BUCKETS
    423 # ifdef KMK /* Move to Makefile.kmk? */
    424 #  define VARIABLE_BUCKETS              16384
     423# ifdef KMK /* Move to Makefile.kmk? (insanely high, but wtf, it gets the collitions down) */
     424#  define VARIABLE_BUCKETS              65535
    425425# else  /*!KMK*/
    426426#define VARIABLE_BUCKETS                523
     
    429429#ifndef PERFILE_VARIABLE_BUCKETS
    430430# ifdef KMK /* Move to Makefile.kmk? */
    431 #  define PERFILE_VARIABLE_BUCKETS      64
     431#  define PERFILE_VARIABLE_BUCKETS      127
    432432# else
    433433#define PERFILE_VARIABLE_BUCKETS        23
     
    436436#ifndef SMALL_SCOPE_VARIABLE_BUCKETS
    437437# ifdef KMK /* Move to Makefile.kmk? */
    438 #  define SMALL_SCOPE_VARIABLE_BUCKETS  32
     438#  define SMALL_SCOPE_VARIABLE_BUCKETS  63
    439439# else
    440440#define SMALL_SCOPE_VARIABLE_BUCKETS    13
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette