Show
Ignore:
Timestamp:
10/13/09 18:35:01 (4 years ago)
Author:
saturday06
Message:

テスト

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/objective-cplusplus/i3/trunk/src/mil/src/Test13.cpp

    r35595 r35596  
    66 
    77#include "Test.h" 
    8 #define MIL_TMALLOC_TBB 
     8 
     9//#define MIL_PROFILE 
     10 
     11//#define MIL_TMALLOC_TBB 
    912//#define MIL_TMALLOC_MALLOC 
    10 #define MIL_PROFILE 
    1113 
    1214#ifdef MIL_TMALLOC_TBB 
     
    5557        } 
    5658 
    57                 const char foo[] = "data"; 
     59                const char foo[] = "odasdfadfaigjsfogi"; 
    5860                TestEvent e; 
    5961                e.data = test_malloc(sizeof(foo)); 
     
    6466    void execute(TestEvent& e) { 
    6567                data += (intptr_t)e.data; 
    66                 const char exp[] = "data"; 
     68                const char exp[] = "odasdfadfaigjsfogi"; 
    6769                QT_CHECK(!is_bad_read_pointer(e.data, sizeof(exp))); 
    6870                QT_CHECK(!is_bad_write_pointer(e.data, sizeof(exp))); 
     
    8385        for (int i = 0; i < 5; i++) { 
    8486            TestEvent e; 
    85                         const char foo[] = "data"; 
     87                        const char foo[] = "odasdfadfaigjsfogi"; 
    8688                        e.data = test_malloc(sizeof(foo)); 
    8789                        memcpy(e.data, foo, sizeof(foo)); 
     
    100102#elif defined(MIL_TMALLOC_MALLOC) 
    101103        char* test_malloc(size_t size) { 
    102                 return (char*)malloc(5); 
     104                return (char*)malloc(size); 
    103105        } 
    104106        void test_free(void* data) { 
     
    107109#else 
    108110        char* test_malloc(size_t size) { 
    109                 return (char*)tmalloc(5); 
     111                return (char*)tmalloc(size); 
    110112        } 
    111113        void test_free(void* data) { 
     
    161163#endif 
    162164#endif 
    163     for (int i = 0; i < 5; i++) { 
     165    for (int i = 0; i < 3; i++) { 
    164166        n_times(); 
    165167#ifdef MIL_PROFILE