| 95 | } |
| 96 | |
| 97 | void KVCacheManager::unmapKVCache(size_t keySize, size_t valueSize) |
| 98 | { |
| 99 | if (mMapKeyAddr != nullptr) { |
| 100 | MNNMmapSync(mMapKeyAddr, keySize); |
| 101 | MNNUnmapFile(mMapKeyAddr, keySize); |
| 102 | mMapKeyAddr = nullptr; |
| 103 | } |
| 104 | if (mMapValueAddr != nullptr) { |
| 105 | MNNMmapSync(mMapValueAddr, valueSize); |
| 106 | MNNUnmapFile(mMapValueAddr, valueSize); |
| 107 | mMapValueAddr = nullptr; |
| 108 | } |
| 109 | } |
| 110 | |
| 111 | } // namespace MNN |
| 112 |
nothing calls this directly
no test coverage detected