aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/stable/myriad.cpp6
-rw-r--r--src/unstable/cachebase.h8
-rw-r--r--src/unstable/myriadcache.h2
3 files changed, 8 insertions, 8 deletions
diff --git a/src/stable/myriad.cpp b/src/stable/myriad.cpp
index 53250c2..d564b70 100644
--- a/src/stable/myriad.cpp
+++ b/src/stable/myriad.cpp
@@ -384,7 +384,7 @@ bool Bu::Myriad::loadMyriad()
384 384
385 // We need to read enough so that we can gurantee that we're within a block 385 // We need to read enough so that we can gurantee that we're within a block
386 // that we have read the index to, plus one index. 386 // that we have read the index to, plus one index.
387 for( int32_t j = 0; j < iHeaderStreamBlocks; j++ ) 387 for( int32_t j = 0; ; j++ )
388 { 388 {
389 int32_t iBlockIndex; 389 int32_t iBlockIndex;
390 MyriadRead( &iBlockIndex, 4 ); 390 MyriadRead( &iBlockIndex, 4 );
@@ -455,8 +455,8 @@ void Bu::Myriad::createMyriad( int32_t iBlockSize, int32_t iPreallocateBlocks )
455 int iHeaderStreamBlocks = blkDiv(iHeaderStreamBytes+4, iBlockSize ); 455 int iHeaderStreamBlocks = blkDiv(iHeaderStreamBytes+4, iBlockSize );
456 456
457 //Bu::println("Initial estimate: %1 bytes / %2 cur blocks, %3 computed blocks (%4 target bytes).").arg( iHeaderStreamBytes+(iHeaderStreamBlocks*4) ).arg( iHeaderStreamBlocks ).arg( blkDiv((iHeaderStreamBytes+(iHeaderStreamBlocks*4)), iBlockSize) ).arg( iHeaderStreamBlocks*iBlockSize ); 457 //Bu::println("Initial estimate: %1 bytes / %2 cur blocks, %3 computed blocks (%4 target bytes).").arg( iHeaderStreamBytes+(iHeaderStreamBlocks*4) ).arg( iHeaderStreamBlocks ).arg( blkDiv((iHeaderStreamBytes+(iHeaderStreamBlocks*4)), iBlockSize) ).arg( iHeaderStreamBlocks*iBlockSize );
458 while( iHeaderStreamBytes+(iHeaderStreamBlocks*4) 458 while( iHeaderStreamBytes+(iHeaderStreamBlocks*4)+4
459 > iHeaderStreamBlocks*iBlockSize ) 459 >= iHeaderStreamBlocks*iBlockSize )
460 { 460 {
461 iHeaderStreamBlocks = blkDiv((iHeaderStreamBytes+((iHeaderStreamBlocks+1)*4)), iBlockSize); 461 iHeaderStreamBlocks = blkDiv((iHeaderStreamBytes+((iHeaderStreamBlocks+1)*4)), iBlockSize);
462 if( iHeaderStreamBlocks > 100 ) 462 if( iHeaderStreamBlocks > 100 )
diff --git a/src/unstable/cachebase.h b/src/unstable/cachebase.h
index 9ac1b8c..830f5fe 100644
--- a/src/unstable/cachebase.h
+++ b/src/unstable/cachebase.h
@@ -32,15 +32,15 @@ namespace Bu
32 bDeleted( false ), 32 bDeleted( false ),
33 pObject( pObject ) 33 pObject( pObject )
34 { 34 {
35 Bu::println("CacheEntry::CacheEntry: registering pObject (0x%1)"). 35 //Bu::println("CacheEntry::CacheEntry: registering pObject (0x%1)").
36 arg( reinterpret_cast<ptrdiff_t>(pObject), Bu::Fmt::hex() ); 36 // arg( reinterpret_cast<ptrdiff_t>(pObject), Bu::Fmt::hex() );
37 } 37 }
38 38
39 virtual ~CacheEntry() 39 virtual ~CacheEntry()
40 { 40 {
41 mEntry.lock(); 41 mEntry.lock();
42 Bu::println("CacheEntry::~CacheEntry: deleting pObject (0x%1)"). 42 //Bu::println("CacheEntry::~CacheEntry: deleting pObject (0x%1)").
43 arg( reinterpret_cast<ptrdiff_t>(pObject), Bu::Fmt::hex() ); 43 // arg( reinterpret_cast<ptrdiff_t>(pObject), Bu::Fmt::hex() );
44 delete pObject; 44 delete pObject;
45 mEntry.unlock(); 45 mEntry.unlock();
46 } 46 }
diff --git a/src/unstable/myriadcache.h b/src/unstable/myriadcache.h
index 289ab05..3629005 100644
--- a/src/unstable/myriadcache.h
+++ b/src/unstable/myriadcache.h
@@ -29,7 +29,7 @@ namespace Bu
29 { 29 {
30 Bu::ReadWriteMutex::ReadLocker l( rwStore ); 30 Bu::ReadWriteMutex::ReadLocker l( rwStore );
31 Bu::MyriadStream ms = mStore.open( 31 Bu::MyriadStream ms = mStore.open(
32 1, Bu::Myriad::WriteNew|Bu::Myriad::Read 32 1, Bu::Myriad::Read
33 ); 33 );
34 Bu::Archive ar( ms, Bu::Archive::load ); 34 Bu::Archive ar( ms, Bu::Archive::load );
35 uint8_t uVer; 35 uint8_t uVer;