2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-18 14:02:11 +00:00

Variety of performance improvements.

* bjam; bump to version 3.1.12
* bjam; make it possible to build in MinGW/MSYS shell
* bjam; move profile code to debug.h/c to make it available for use everywhere
* bjam; cache all filesystem query operations, Unix and Windows only, include PWD and scanning
* bjam; add memory profile info, and sprinkle throught code
* bbv2; rewrite some while() loops into for() loops to reduce time and memory
* bbv2; keep a single instance counter instead of one per type to reduce memory use
* bjam+bbv2; change NORMALIZE_PATH builtin to join path parts to reduce memory use


[SVN r31177]
This commit is contained in:
Rene Rivera
2005-10-03 00:47:36 +00:00
parent 1fa3a7afab
commit eed0cf6cc3
40 changed files with 738 additions and 304 deletions

View File

@@ -3,6 +3,7 @@
/* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) */
#include "strings.h"
#include "debug.h"
#include <stdlib.h>
#include <string.h>
#include <assert.h>
@@ -55,6 +56,8 @@ static void string_reserve_internal( string* self, size_t capacity )
if ( self->value == self->opt )
{
self->value = (char*)malloc( capacity + JAM_STRING_MAGIC_SIZE );
if ( DEBUG_PROFILE )
profile_memory( capacity + JAM_STRING_MAGIC_SIZE );
self->value[0] = 0;
strncat( self->value, self->opt, sizeof(self->opt) );
assert( strlen( self->value ) <= self->capacity ); /* This is a regression test */