Ignore:
Timestamp:
Sep 24, 2008, 2:36:26 AM (16 years ago)
Author:
イグトランス (egtra)
Message:

性能がよいというdlmallocを導入。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ab5.0/abdev/BasicCompiler_Common/Intermediate_Step1.cpp

    r735 r751  
    5555void DeleteComment(char *buffer){   //注釈「'」の取り除き
    5656    int i,i2,i3,IsStr;
    57     char *temporary=(char *)HeapAlloc(hHeap,HEAP_ZERO_MEMORY,lstrlen(buffer)+1);
     57    char *temporary=(char *)calloc(lstrlen(buffer)+1,sizeof (char));
    5858    for(i=0,i2=0,i3=0,IsStr=0;;i++,i2++){
    5959        if(buffer[i]=='\"') IsStr^=1;
     
    9999    }
    100100    lstrcpy(buffer,temporary);
    101     HeapDefaultFree(temporary);
     101    free(temporary);
    102102}
    103103void CheckParenthesis(char *buffer){
     
    372372
    373373    bool isBeforeCharDelimitation = true;
    374     temporary=(char *)HeapAlloc(hHeap,HEAP_ZERO_MEMORY,(lstrlen(buffer)+255)*2);
     374    temporary=(char *)calloc((lstrlen(buffer)+255)*2,sizeof (char));
    375375    for(i=0,i2=0,IsStr=0;;i++,i2++){
    376376        if(buffer[i]=='\"') IsStr^=1;
     
    990990    }
    991991    lstrcpy(buffer,temporary);
    992     HeapDefaultFree(temporary);
     992    free(temporary);
    993993}
    994994void DefCommandFormat(char *buffer){
     
    11821182    int i,i2;
    11831183
    1184     char *temporary;
    1185     temporary=(char *)HeapAlloc(hHeap,0,lstrlen(buffer)*2+1024);
     1184    char *temporary = (char*)malloc(strlen(buffer)*2+1024);
    11861185
    11871186    //1行Ifをブロック形式にする
     
    12131212    }
    12141213
    1215     HeapDefaultFree(temporary);
     1214    free(temporary);
    12161215}
    12171216void CheckPareCommand(void){
Note: See TracChangeset for help on using the changeset viewer.