Changeset 83c5220 in tol
- Timestamp:
- May 9, 2011, 2:26:59 PM (15 years ago)
- Branches:
- 1941-docker-image-to-test, devel, master
- Children:
- 9d29ae0
- Parents:
- b4aa879
- Location:
- tol
- Files:
-
- 6 edited
-
bbasic/cor.cpp (modified) (2 diffs)
-
bbasic/tol_bcore.h (modified) (2 diffs)
-
btol/bgrammar/nameblock.cpp (modified) (10 diffs)
-
btol/bgrammar/syn.cpp (modified) (5 diffs)
-
btol/timeset_type/tol_btmsgra.h (modified) (1 diff)
-
contrib/optimal_bw/FastUnivariateDensityDerivative.cpp (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tol/bbasic/cor.cpp
rb4aa879 r83c5220 57 57 } 58 58 59 #if (__USE_POOL__!=__POOL_BFSMEM__) 60 61 BCore::MemAssignInfo::MemAssignInfo(BCore* address) 62 { 63 SetAddress(address); 64 } 65 66 void BCore::MemAssignInfo::SetAddress(BCore* address) 67 { 68 address_ = address; 69 size_ = 0; 70 pageNum_ = 0; 71 } 72 73 short BCore::MemAssignInfo::IsAssigned() 74 { 75 return(-1); 76 } 77 78 void BCore::MemAssignInfo::SafeDestroy() 79 { 80 } 81 82 #else 59 83 60 84 BCore::MemAssignInfo::MemAssignInfo(BCore* address) … … 98 122 } 99 123 } 124 125 #endif -
tol/bbasic/tol_bcore.h
rb4aa879 r83c5220 59 59 //See on tol_bfsmem.h a sample of Memory Handler 60 60 virtual short IsAssigned() const { return(-1); } 61 #if (__USE_POOL__==__POOL_BFSMEM__)62 virtual BFixedSizeMemoryBase* GetMemHandler() const { return(NULL); }63 virtual unsigned short GetPageNum () const { return(0); }64 virtual size_t GetSizeOf() const { return(0); }65 61 struct TOL_API MemAssignInfo 66 62 { … … 74 70 void SafeDestroy(); 75 71 }; 76 #else 77 struct TOL_API MemAssignInfo 78 { 79 short IsAssigned() { return(-1); } 80 void SafeDestroy() { } 81 MemAssignInfo(BCore* adress) { } 82 }; 72 #if (__USE_POOL__==__POOL_BFSMEM__) 73 virtual BFixedSizeMemoryBase* GetMemHandler() const { return(NULL); } 83 74 #endif 75 virtual unsigned short GetPageNum () const { return(0); } 76 virtual size_t GetSizeOf() const { return(0); } 84 77 }; 85 78 -
tol/btol/bgrammar/nameblock.cpp
rb4aa879 r83c5220 58 58 BRequiredPackage BNameBlock::globalRequiredPackages_; 59 59 60 #if (__USE_POOL__==__POOL_BFSMEM__) 60 61 static BFixedSizeMemoryBase* BFSMEM_Hndlr = 61 62 BFSMSingleton<sizeof(BNameBlock)>::Handler(); 62 63 #endif 63 64 static BStruct* strNameBlockMemberInfo_ = NULL; 64 65 static BStruct* strClassMemberInfo_ = NULL; … … 128 129 SetEmptyKey(public_ ,NULL); 129 130 SetEmptyKey(private_,NULL); 131 #if (__USE_POOL__==__POOL_BFSMEM__) 130 132 short isAssigned = BFSMEM_Hndlr->IsAssigned(this,this->_bfsm_PageNum__); 133 #else 134 short isAssigned = -1; 135 #endif 131 136 createdWithNew_ = isAssigned==1; 132 137 } … … 152 157 SetEmptyKey(public_ ,NULL); 153 158 SetEmptyKey(private_,NULL); 159 #if (__USE_POOL__==__POOL_BFSMEM__) 154 160 short isAssigned = BFSMEM_Hndlr->IsAssigned(this,this->_bfsm_PageNum__); 161 #else 162 short isAssigned = -1; 163 #endif 155 164 createdWithNew_ = isAssigned==1; 156 165 } … … 174 183 startedPackage(false) 175 184 { 185 #if (__USE_POOL__==__POOL_BFSMEM__) 176 186 short isAssigned = BFSMEM_Hndlr->IsAssigned(this,this->_bfsm_PageNum__); 187 #else 188 short isAssigned = -1; 189 #endif 177 190 createdWithNew_ = isAssigned!=-1; 178 191 *this = ns; … … 277 290 //-------------------------------------------------------------------- 278 291 { 292 #if (__USE_POOL__==__POOL_BFSMEM__) 279 293 if(createdWithNew_) 280 294 { … … 282 296 return(isAssigned); 283 297 } 284 else 298 else 299 #endif 285 300 { 286 301 return(true); … … 321 336 //-------------------------------------------------------------------- 322 337 { 338 #if (__USE_POOL__==__POOL_BFSMEM__) 323 339 if(current_ && 324 340 current_->createdWithNew_ && … … 328 344 current_ = NULL; 329 345 } 346 #endif 330 347 return(current_); 331 348 } … … 344 361 //-------------------------------------------------------------------- 345 362 { 363 #if (__USE_POOL__==__POOL_BFSMEM__) 346 364 if(building_ && 347 365 building_->Contens().createdWithNew_ && … … 353 371 building_ = NULL; 354 372 } 373 #endif 355 374 return(building_); 356 375 } -
tol/btol/bgrammar/syn.cpp
rb4aa879 r83c5220 461 461 } 462 462 463 463 464 //-------------------------------------------------------------------- 464 465 union BIntPointerMask … … 468 469 const BSyntaxObject* obj_; 469 470 const BGrammar* gra_; 471 #if (__USE_POOL__==__POOL_BFSMEM__) 470 472 const BFixedSizeMemoryBase* mhn_; 473 #endif 471 474 }; 472 475 … … 496 499 (sizeof(objMask.obj_) == size) && 497 500 (objMask.obj_->GetPageNum() == pageNum)&& 501 #if (__USE_POOL__==__POOL_BFSMEM__) 498 502 (objMask.obj_->GetMemHandler() == mhnMask.mhn_)&& 503 #endif 499 504 (objMask.obj_->IsAssigned()!=0)) 500 505 { … … 518 523 objMask.obj_ = this; 519 524 graMask.gra_ = Grammar(); 525 #if (__USE_POOL__==__POOL_BFSMEM__) 520 526 mhnMask.mhn_ = GetMemHandler(); 527 #endif 521 528 int mode = Mode(); 522 529 int size = sizeof(this); … … 534 541 return(BText(address)); 535 542 } 543 -
tol/btol/timeset_type/tol_btmsgra.h
rb4aa879 r83c5220 424 424 } 425 425 426 BBool Contain (const BDate&) const { return(BFALSE); }427 BInt PeriodsBetween(const BDate& d1, const BDate& d2) const { return(0); }426 //BBool Contain (const BDate&) const { return(BFALSE); } 427 //BInt PeriodsBetween(const BDate& d1, const BDate& d2) const { return(0); } 428 428 429 429 protected: -
tol/contrib/optimal_bw/FastUnivariateDensityDerivative.cpp
rb4aa879 r83c5220 57 57 size_ = size; 58 58 _bfsm_BaseSize__ = sizeof(double)*size_; 59 59 #if (__USE_POOL__==__POOL_BFSMEM__) 60 60 buffer_ = (double*)BFixedSizeMemoryBase:: 61 61 Instance(_bfsm_BaseSize__)->New(_bfsm_BaseSize__,_bfsm_VectorPageNum__); 62 // buffer_ = new double[size_]; 62 #else 63 buffer_ = new double[size_]; 64 #endif 63 65 } 64 66 else … … 74 76 if(buffer_) 75 77 { 78 #if (__USE_POOL__==__POOL_BFSMEM__) 76 79 BFixedSizeMemoryBase::Instance(_bfsm_BaseSize__)->Delete(buffer_,_bfsm_VectorPageNum__); 77 //delete buffer_; 80 #else 81 delete buffer_; 82 #endif 78 83 buffer_ = NULL; 79 84 size_ = 0; … … 90 95 size_ = size; 91 96 _bfsm_BaseSize__ = sizeof(int)*size_; 97 #if (__USE_POOL__==__POOL_BFSMEM__) 92 98 buffer_ = (int*)BFixedSizeMemoryBase:: 93 99 Instance(_bfsm_BaseSize__)->New(_bfsm_BaseSize__,_bfsm_VectorPageNum__); 94 //buffer_ = new int[size_]; 100 #else 101 buffer_ = new int[size_]; 102 #endif 95 103 } 96 104 else … … 106 114 if(buffer_) 107 115 { 116 #if (__USE_POOL__==__POOL_BFSMEM__) 108 117 BFixedSizeMemoryBase::Instance(_bfsm_BaseSize__)->Delete(buffer_,_bfsm_VectorPageNum__); 109 //delete buffer_; 118 #else 119 delete buffer_; 120 #endif 110 121 buffer_ = NULL; 111 122 size_ = 0;
Note: See TracChangeset
for help on using the changeset viewer.
