MCPcopy Create free account
hub / github.com/catboost/catboost / TMapResult

Class TMapResult

util/system/filemap.h:23–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21
22struct TMemoryMapCommon {
23 struct TMapResult {
24 inline size_t MappedSize() const noexcept {
25 return Size - Head;
26 }
27
28 inline void* MappedData() const noexcept {
29 return Ptr ? (void*)((char*)Ptr + Head) : nullptr;
30 }
31
32 inline bool IsMapped() const noexcept {
33 return Ptr != nullptr;
34 }
35
36 inline void Reset() noexcept {
37 Ptr = nullptr;
38 Size = 0;
39 Head = 0;
40 }
41
42 void* Ptr;
43 size_t Size;
44 i32 Head;
45
46 TMapResult(void) noexcept {
47 Reset();
48 }
49 };
50
51 enum EOpenModeFlag {
52 oRdOnly = 1,

Callers 1

MapFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected