Changeset 1643 for pjproject


Ignore:
Timestamp:
Dec 28, 2007 7:03:20 PM (17 years ago)
Author:
bennylp
Message:

Set pool_test_malloc_free() to use malloc()/free() instead of new/delete since there is compilation error on Symbian with GCCE compiler. But this most likely will fail on run-time, so currently this test is broken for Symbian

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjlib/src/pjlib-test/pool_perf.c

    r1238 r1643  
    6262 
    6363/* Symbian doesn't have malloc()/free(), so we use new/delete instead */ 
    64 #if defined(PJ_SYMBIAN) && PJ_SYMBIAN != 0 
    65  
     64//#if defined(PJ_SYMBIAN) && PJ_SYMBIAN != 0 
     65#if 0 
    6666static int pool_test_malloc_free() 
    6767{ 
     
    6969 
    7070    for (i=0; i<COUNT; ++i) { 
    71         p[i] = new char[sizes[i]]; 
    72         if (!p[i]) { 
    73             PJ_LOG(3,(THIS_FILE,"   error: malloc failed to allocate %d bytes", 
    74                       sizes[i])); 
    75             --i; 
    76             while (i >= 0) 
    77                 delete [] p[i], --i; 
    78             return -1; 
    79         } 
    80         *p[i] = '\0'; 
     71                p[i] = new char[sizes[i]]; 
     72                if (!p[i]) { 
     73                        PJ_LOG(3,(THIS_FILE,"   error: malloc failed to allocate %d bytes", 
     74                                          sizes[i])); 
     75                        --i; 
     76                        while (i >= 0) { 
     77                                delete [] p[i]; 
     78                                --i; 
     79                        } 
     80                        return -1; 
     81                } 
     82                *p[i] = '\0'; 
    8183    } 
    8284 
    8385    for (i=0; i<COUNT; ++i) { 
    84         delete [] p[i]; 
     86        delete [] p[i]; 
    8587    } 
    8688 
Note: See TracChangeset for help on using the changeset viewer.