- Timestamp:
- Sep 24, 2008, 2:36:26 AM (16 years ago)
- Location:
- trunk/ab5.0/abdev
- Files:
-
- 1 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ab5.0/abdev/BasicCompiler_Common/Intermediate_Step1.cpp
r735 r751 55 55 void DeleteComment(char *buffer){ //注釈「'」の取り除き 56 56 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)); 58 58 for(i=0,i2=0,i3=0,IsStr=0;;i++,i2++){ 59 59 if(buffer[i]=='\"') IsStr^=1; … … 99 99 } 100 100 lstrcpy(buffer,temporary); 101 HeapDefaultFree(temporary);101 free(temporary); 102 102 } 103 103 void CheckParenthesis(char *buffer){ … … 372 372 373 373 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)); 375 375 for(i=0,i2=0,IsStr=0;;i++,i2++){ 376 376 if(buffer[i]=='\"') IsStr^=1; … … 990 990 } 991 991 lstrcpy(buffer,temporary); 992 HeapDefaultFree(temporary);992 free(temporary); 993 993 } 994 994 void DefCommandFormat(char *buffer){ … … 1182 1182 int i,i2; 1183 1183 1184 char *temporary; 1185 temporary=(char *)HeapAlloc(hHeap,0,lstrlen(buffer)*2+1024); 1184 char *temporary = (char*)malloc(strlen(buffer)*2+1024); 1186 1185 1187 1186 //1行Ifをブロック形式にする … … 1213 1212 } 1214 1213 1215 HeapDefaultFree(temporary);1214 free(temporary); 1216 1215 } 1217 1216 void CheckPareCommand(void){ -
trunk/ab5.0/abdev/BasicCompiler_Common/Intermediate_Step2.cpp
r543 r751 395 395 char *temporary,*tempBase,temp2[VN_SIZE],*lpCommand; 396 396 397 tempBase=(char *) HeapAlloc(hHeap,0,(lstrlen(buffer)+1)*2+8192);397 tempBase=(char *)malloc((lstrlen(buffer)+1)*2+8192); 398 398 temporary=tempBase+1; 399 399 temporary[0]=0; … … 402 402 403 403 CommandBufferSize=512; 404 lpCommand=(char *)HeapAlloc(hHeap,0,CommandBufferSize); 404 405 lpCommand=(char *)malloc(CommandBufferSize); 405 406 406 407 while(1){ … … 417 418 if(i2>=CommandBufferSize){ //バッファ領域が足りなくなった場合はバッファを増量する 418 419 CommandBufferSize+=512; 419 lpCommand=(char *) HeapReAlloc(hHeap,0,lpCommand,CommandBufferSize);420 lpCommand=(char *)realloc(lpCommand,CommandBufferSize); 420 421 } 421 422 if(buffer[i]=='\"') IsStr^=1; … … 463 464 if(buffer[i]=='\0') break; 464 465 } 465 HeapDefaultFree(lpCommand);466 free(lpCommand); 466 467 lstrcpy(buffer,temporary); 467 468 468 HeapDefaultFree(tempBase);469 free(tempBase); 469 470 } -
trunk/ab5.0/abdev/BasicCompiler_Common/Subroutine.cpp
r702 r751 232 232 //パラメータを整備 233 233 char *Parameter; 234 Parameter=(char *) HeapAlloc(hHeap,0,lstrlen(ArrayElements)+(rightSide ? lstrlen(rightSide) : 0)+32);234 Parameter=(char *)malloc(lstrlen(ArrayElements)+(rightSide ? lstrlen(rightSide) : 0)+32); 235 235 lstrcpy(Parameter,ArrayElements); 236 236 if(rightSide){ … … 255 255 } 256 256 257 HeapDefaultFree(Parameter);257 free(Parameter); 258 258 259 259 return true; -
trunk/ab5.0/abdev/BasicCompiler_Common/src/BoostSerializationSupport.cpp
r636 r751 45 45 #include <jenga/include/jenga.h> 46 46 47 #include <abdev/ab_common/include/libs.h> 48 47 49 using namespace Jenga::Common; 48 50 -
trunk/ab5.0/abdev/ab_common/ab_common.vcproj
r750 r751 282 282 RelativePath=".\src\Environment.cpp" 283 283 > 284 </File> 285 <File 286 RelativePath="..\malloc.c" 287 > 288 <FileConfiguration 289 Name="Debug(x86)|Win32" 290 > 291 <Tool 292 Name="VCCLCompilerTool" 293 PreprocessorDefinitions="USE_DL_PREFIX" 294 UsePrecompiledHeader="0" 295 /> 296 </FileConfiguration> 297 <FileConfiguration 298 Name="Release(x86)|Win32" 299 > 300 <Tool 301 Name="VCCLCompilerTool" 302 Optimization="3" 303 PreprocessorDefinitions="USE_DL_PREFIX" 304 UsePrecompiledHeader="0" 305 /> 306 </FileConfiguration> 307 <FileConfiguration 308 Name="Debug(x64)|Win32" 309 > 310 <Tool 311 Name="VCCLCompilerTool" 312 PreprocessorDefinitions="USE_DL_PREFIX" 313 UsePrecompiledHeader="0" 314 /> 315 </FileConfiguration> 316 <FileConfiguration 317 Name="Release(x64)|Win32" 318 > 319 <Tool 320 Name="VCCLCompilerTool" 321 PreprocessorDefinitions="USE_DL_PREFIX" 322 UsePrecompiledHeader="0" 323 /> 324 </FileConfiguration> 284 325 </File> 285 326 <File -
trunk/ab5.0/abdev/ab_common/src/Environment.cpp
r719 r751 35 35 throw; 36 36 } 37 38 void* operator new( std::size_t n ) 39 { 40 if ( void* p = dlmalloc(n) ){ 41 return p; 42 } 43 else{ 44 throw std::bad_alloc(); 45 } 46 } 47 48 void* operator new[]( std::size_t n ) 49 { 50 return ::operator new( n ); 51 } 52 53 void operator delete( void* p ) 54 { 55 dlfree( p ); 56 } 57 58 void operator delete[]( void* p ) 59 { 60 ::operator delete( p ); 61 }
Note:
See TracChangeset
for help on using the changeset viewer.