Ignore:
Timestamp:
Sep 18, 2006, 5:02:39 AM (19 years ago)
Author:
bird
Message:

o Optimization summary: libc from ~21 seconds -> 7-8 seconds (os2/nt).
o Optimized appending new stuff to variables. (major win)
o Optimized variable memory value allocation avoiding a bunch of

unnecessary copying and allocating.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/gmake/function.c

    r531 r533  
    3636#endif
    3737
    38 #ifdef KMK
     38#ifdef KMK_HELPERS
    3939# include "kbuild.h"
    4040#endif
     
    887887      char *result = 0;
    888888#ifdef CONFIG_WITH_VALUE_LENGTH
    889       if (len > (unsigned int)var->value_length)
     889      if (len >= (unsigned int)var->value_alloc_len)
    890890        {
    891891          free (var->value);
    892           var->value = xmalloc (len + 1);
     892          var->value_alloc_len = (len + 32) & ~31;
     893          var->value = xmalloc (var->value_alloc_len);
    893894        }
    894895      memcpy (var->value, p, len);
     
    23302331  { STRING_SIZE_TUPLE("comp-vars"),     3,  3,  1,  func_comp_vars},
    23312332#endif
    2332 #ifdef KMK
     2333#ifdef KMK_HELPERS
    23332334  { STRING_SIZE_TUPLE("kb-src-tool"),   1,  1,  0,  func_kbuild_source_tool},
    23342335  { STRING_SIZE_TUPLE("kb-obj-base"),   1,  1,  0,  func_kbuild_object_base},
Note: See TracChangeset for help on using the changeset viewer.