A reference to a mutable range of memory with shared ownership. Use with caution :)
| 205 | //! A reference to a mutable range of memory with shared ownership. |
| 206 | //! Use with caution :) |
| 207 | class TSharedMutableRef |
| 208 | : public TSharedMutableRange<char> |
| 209 | { |
| 210 | public: |
| 211 | //! Creates a null TSharedMutableRef. |
| 212 | TSharedMutableRef() = default; |
| 213 | |
| 214 | //! Creates a TSharedMutableRef with a given holder. |
| 215 | TSharedMutableRef(const TMutableRef& ref, TSharedRangeHolderPtr holder); |
| 216 | |
| 217 | //! Creates a TSharedMutableRef from a pointer and length. |
| 218 | TSharedMutableRef(void* data, size_t length, TSharedRangeHolderPtr holder); |
| 219 | |
| 220 | //! Creates a TSharedMutableRef from a range. |
| 221 | TSharedMutableRef(void* begin, void* end, TSharedRangeHolderPtr holder); |
| 222 | |
| 223 | //! Creates an empty TSharedMutableRef. |
| 224 | static TSharedMutableRef MakeEmpty(); |
| 225 | |
| 226 | //! Converts a TSharedMutableRef to TMutableRef. |
| 227 | operator TMutableRef() const; |
| 228 | |
| 229 | //! Converts a TSharedMutableRef to TSharedRef. |
| 230 | operator TSharedRef() const; |
| 231 | |
| 232 | //! Converts a TSharedMutableRef to TRef. |
| 233 | operator TRef() const; |
| 234 | |
| 235 | |
| 236 | //! Allocates a new shared block of memory. |
| 237 | //! The memory is marked with a given tag. |
| 238 | template <class TTag> |
| 239 | static TSharedMutableRef Allocate(size_t size, TSharedMutableRefAllocateOptions options = {}); |
| 240 | |
| 241 | //! Allocates a new shared block of memory. |
| 242 | //! The memory is marked with TDefaultSharedBlobTag. |
| 243 | static TSharedMutableRef Allocate(size_t size, TSharedMutableRefAllocateOptions options = {}); |
| 244 | |
| 245 | //! Allocates a new shared block of memory. |
| 246 | //! The memory is marked with a given tag. |
| 247 | static TSharedMutableRef Allocate(size_t size, TSharedMutableRefAllocateOptions options, TRefCountedTypeCookie tagCookie); |
| 248 | |
| 249 | //! Allocates a new page aligned shared block of memory. |
| 250 | //! #size must be divisible by page size. |
| 251 | //! The memory is marked with a given tag. |
| 252 | template <class TTag> |
| 253 | static TSharedMutableRef AllocatePageAligned(size_t size, TSharedMutableRefAllocateOptions options = {}); |
| 254 | |
| 255 | //! Allocates a new page aligned shared block of memory. |
| 256 | //! #size must be divisible by page size. |
| 257 | //! The memory is marked with TDefaultSharedBlobTag. |
| 258 | static TSharedMutableRef AllocatePageAligned(size_t size, TSharedMutableRefAllocateOptions options = {}); |
| 259 | |
| 260 | //! Allocates a new page aligned shared block of memory. |
| 261 | //! #size must be divisible by page size. |
| 262 | //! The memory is marked with a given tag. |
| 263 | static TSharedMutableRef AllocatePageAligned(size_t size, TSharedMutableRefAllocateOptions options, TRefCountedTypeCookie tagCookie); |
| 264 |
no outgoing calls
no test coverage detected