| 14 | static constexpr double BlobCapacityMultiplier = 1.5; |
| 15 | |
| 16 | TBlob::TBlob( |
| 17 | TRefCountedTypeCookie tagCookie, |
| 18 | size_t size, |
| 19 | bool initializeStorage, |
| 20 | bool pageAligned) |
| 21 | : PageAligned_(pageAligned) |
| 22 | { |
| 23 | SetTagCookie(tagCookie); |
| 24 | if (size == 0) { |
| 25 | Reset(); |
| 26 | } else { |
| 27 | Allocate(std::max(size, InitialBlobCapacity)); |
| 28 | Size_ = size; |
| 29 | if (initializeStorage) { |
| 30 | ::memset(Begin_, 0, Size_); |
| 31 | } |
| 32 | } |
| 33 | } |
| 34 | |
| 35 | TBlob::TBlob( |
| 36 | TRefCountedTypeCookie tagCookie, |