Changeset 37790

Show
Ignore:
Timestamp:
06/03/10 23:51:56 (3 years ago)
Author:
saturday06
Message:
 
Location:
lang/objective-cplusplus/i3/trunk
Files:
5 modified

Legend:

Unmodified
Added
Removed
  • lang/objective-cplusplus/i3/trunk/configure.ac

    r37788 r37790  
    354354# Checks for header files. 
    355355 
    356 AC_CHECK_HEADERS([malloc.h semaphore.h tbb/tbb_allocator.h]) 
     356AC_CHECK_HEADERS([malloc.h semaphore.h]) 
    357357AC_CHECK_HEADERS([uxtheme.h dwmapi.h], [], [], [ 
    358358#include <windows.h> 
    359359]) 
    360360 
     361AC_CHECK_HEADERS([tbb/tbb_allocator.h], [ 
     362    I3_ADD_LDFLAGS([-ltbb]) 
     363]) 
    361364 
    362365# --------------------------------------- 
  • lang/objective-cplusplus/i3/trunk/src/mil/include/mil/Pool.h

    r37783 r37790  
    66#define MIL_DEBUG_PRODUCER   0 
    77#define MIL_MY_PRODUCER      0 
    8 #define MIL_MALLOC_PRODUCER  1 
    9 #define MIL_TBB_PRODUCER     0 
     8#define MIL_MALLOC_PRODUCER  0 
     9#define MIL_TBB_PRODUCER     1 
    1010 
    1111namespace mil { 
     
    132132} 
    133133 
    134 #if HAVE_TBB_ALLOCATOR_H 
     134#if HAVE_TBB_TBB_ALLOCATOR_H 
    135135#include <tbb/tbb_allocator.h> 
    136136namespace mil { 
     
    188188 
    189189    void store(void* memory) { 
     190        boost::uint_fast32_t blocks = 0; 
    190191        memory = (void*)((char*)memory - sizeof(blocks)); 
    191         boost::uint_fast32_t blocks = *(boost::uint_fast32_t*)memory; 
     192        blocks = *(boost::uint_fast32_t*)memory; 
    192193        if (blocks <= private_::MALLOC_BLOCKS_THESHOLD) { 
    193194            tbb_a.deallocate((mil::pool::TBBMemoryUnit*)memory, blocks); 
    194195        } else { 
    195             ::free((void*)mem); 
     196            ::free((void*)memory); 
    196197        }        
    197198    } 
  • lang/objective-cplusplus/i3/trunk/src/mil/include/mil/StaticData.cc

    r37749 r37790  
    2424#endif 
    2525namespace pool { 
    26 tbb::tbb_allocator<TbbMemoryUnit> tbb_a; 
     26tbb::tbb_allocator<TBBMemoryUnit> tbb_a; 
    2727} 
    2828#endif 
  • lang/objective-cplusplus/i3/trunk/src/mil/src/profile/Module.cc

    r37749 r37790  
    3737// bench class 
    3838 
    39 #ifdef MIL_PROFILE 
     39#if MIL_PROFILE 
    4040const unsigned int POST_MAX = 90000; 
    4141#else 
     
    8484    void execute(AllPosted& e) { 
    8585        elapsed = clock() - begin; 
    86 #ifdef MIL_PROFILE 
     86#if MIL_PROFILE 
    8787        // printf("AllPosted Received : %lf, global = %d, index = %d\n", 
    8888        //        (double)(clock() - begin) / CLOCKS_PER_SEC, global.load(), index); 
     
    128128    } 
    129129 
    130 #ifdef MIL_PROFILE 
     130#if MIL_PROFILE 
    131131    double average = 0; 
    132132    for (size_t i = 0; i < _countof(Bencher::benchers); i++) { 
  • lang/objective-cplusplus/i3/trunk/src/mil/src/profile/Profile.h

    r37009 r37790  
    1515#endif 
    1616 
     17#define MIL_PROFILE 1 
     18