summaryrefslogtreecommitdiff
path: root/view/sharedcache/core/MappedFileAccessor.h
diff options
context:
space:
mode:
authorMason Reed <mason@vector35.com>2025-04-06 20:00:00 -0400
committerMason Reed <mason@vector35.com>2025-04-06 20:00:37 -0400
commitc22d54c5d95f4d23629484579414387b0c7503ee (patch)
tree933a58c8ed3518f507f5bd4d496364411273f5b9 /view/sharedcache/core/MappedFileAccessor.h
parent4f22a944d77f784b53ee3a37d9f1966ede1c98a4 (diff)
[SharedCache] Replace write log with callback registration for reapplying slide info
This improves performance by ~10x with the only real issue being a copy of the cache entry existing for each weak ref. Also fixes - Some old TODO's that are no longer relevant - Some function signatures not being const - FileAccessorCache not evicting enough accessors to fit under an adjusted cache size - Added a warning if we are over the global cache size in view initialization - Logger name not having a `.` in `SlideInfoProcessor::SlideInfoProcessor` - Re-added the accessor dirty check before applying slide info to fix https://github.com/Vector35/binaryninja-api/issues/6570
Diffstat (limited to 'view/sharedcache/core/MappedFileAccessor.h')
-rw-r--r--view/sharedcache/core/MappedFileAccessor.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/view/sharedcache/core/MappedFileAccessor.h b/view/sharedcache/core/MappedFileAccessor.h
index 2bbf4ba9..a63d8506 100644
--- a/view/sharedcache/core/MappedFileAccessor.h
+++ b/view/sharedcache/core/MappedFileAccessor.h
@@ -70,23 +70,23 @@ public:
std::string ReadNullTermString(size_t address, size_t maxLength = -1) const;
- uint8_t ReadUInt8(size_t address);
+ uint8_t ReadUInt8(size_t address) const;
- int8_t ReadInt8(size_t address);
+ int8_t ReadInt8(size_t address) const;
- uint16_t ReadUInt16(size_t address);
+ uint16_t ReadUInt16(size_t address) const;
- int16_t ReadInt16(size_t address);
+ int16_t ReadInt16(size_t address) const;
- uint32_t ReadUInt32(size_t address);
+ uint32_t ReadUInt32(size_t address) const;
- int32_t ReadInt32(size_t address);
+ int32_t ReadInt32(size_t address) const;
- uint64_t ReadUInt64(size_t address);
+ uint64_t ReadUInt64(size_t address) const;
- int64_t ReadInt64(size_t address);
+ int64_t ReadInt64(size_t address) const;
- BinaryNinja::DataBuffer ReadBuffer(size_t addr, size_t length);
+ BinaryNinja::DataBuffer ReadBuffer(size_t addr, size_t length) const;
// Returns a range of pointers within the mapped memory region corresponding to
// {addr, length}.
@@ -99,5 +99,5 @@ public:
void Read(void* dest, size_t addr, size_t length) const;
template <typename T>
- T Read(size_t address);
+ T Read(size_t address) const;
};