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_Step2.cpp

    r543 r751  
    395395    char *temporary,*tempBase,temp2[VN_SIZE],*lpCommand;
    396396
    397     tempBase=(char *)HeapAlloc(hHeap,0,(lstrlen(buffer)+1)*2+8192);
     397    tempBase=(char *)malloc((lstrlen(buffer)+1)*2+8192);
    398398    temporary=tempBase+1;
    399399    temporary[0]=0;
     
    402402
    403403    CommandBufferSize=512;
    404     lpCommand=(char *)HeapAlloc(hHeap,0,CommandBufferSize);
     404
     405    lpCommand=(char *)malloc(CommandBufferSize);
    405406
    406407    while(1){
     
    417418            if(i2>=CommandBufferSize){  //バッファ領域が足りなくなった場合はバッファを増量する
    418419                CommandBufferSize+=512;
    419                 lpCommand=(char *)HeapReAlloc(hHeap,0,lpCommand,CommandBufferSize);
     420                lpCommand=(char *)realloc(lpCommand,CommandBufferSize);
    420421            }
    421422            if(buffer[i]=='\"') IsStr^=1;
     
    463464        if(buffer[i]=='\0') break;
    464465    }
    465     HeapDefaultFree(lpCommand);
     466    free(lpCommand);
    466467    lstrcpy(buffer,temporary);
    467468
    468     HeapDefaultFree(tempBase);
     469    free(tempBase);
    469470}
Note: See TracChangeset for help on using the changeset viewer.