-//=======================================================================
-/**
- * Static data map (block_size -> StorageInfo)
- */
-//=======================================================================
-static NCollection_DataMap<Standard_Size, StorageInfo>& StorageMap()
-{
- static NCollection_IncAllocator TheAlloc;
- static NCollection_DataMap<Standard_Size, StorageInfo>
- TheMap (1, & TheAlloc);
- return TheMap;
-}
+ //! Structure for collecting statistics about blocks of one size
+ struct StorageInfo
+ {
+ Standard_Size roundSize;
+ int nbAlloc;
+ int nbFree;
+ StorageInfo() : roundSize(0), nbAlloc(0), nbFree(0) {}
+ StorageInfo(Standard_Size theSize) : roundSize(theSize), nbAlloc(0), nbFree(0) {}
+ };
+
+ //! Static data map (block_size -> StorageInfo)
+ static NCollection_DataMap<Standard_Size, StorageInfo>& StorageMap()
+ {
+ static NCollection_IncAllocator TheAlloc;
+ static NCollection_DataMap<Standard_Size, StorageInfo> TheMap (1, & TheAlloc);
+ return TheMap;
+ }