Switch to memmap2 fork
This commit is contained in:
parent
730cb3b7cc
commit
edff62af3d
|
@ -2118,6 +2118,15 @@ dependencies = [
|
|||
"winapi 0.3.8",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "memmap2"
|
||||
version = "0.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d9b70ca2a6103ac8b665dc150b142ef0e4e89df640c9e6cf295d189c3caebe5a"
|
||||
dependencies = [
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "memoffset"
|
||||
version = "0.5.4"
|
||||
|
@ -4167,7 +4176,7 @@ dependencies = [
|
|||
"bv",
|
||||
"generic-array 0.14.3",
|
||||
"log 0.4.8",
|
||||
"memmap",
|
||||
"memmap2",
|
||||
"rustc_version",
|
||||
"serde",
|
||||
"serde_derive",
|
||||
|
@ -4721,7 +4730,7 @@ dependencies = [
|
|||
"libc",
|
||||
"libloading 0.6.2",
|
||||
"log 0.4.8",
|
||||
"memmap",
|
||||
"memmap2",
|
||||
"num-derive",
|
||||
"num-traits",
|
||||
"num_cpus",
|
||||
|
@ -4779,7 +4788,7 @@ dependencies = [
|
|||
"lazy_static",
|
||||
"libsecp256k1",
|
||||
"log 0.4.8",
|
||||
"memmap",
|
||||
"memmap2",
|
||||
"num-derive",
|
||||
"num-traits",
|
||||
"pbkdf2",
|
||||
|
|
|
@ -21,7 +21,7 @@ thiserror = "1.0"
|
|||
[target.'cfg(not(target_arch = "bpf"))'.dependencies]
|
||||
solana-logger = { path = "../logger", version = "1.5.0" }
|
||||
generic-array = { version = "0.14.3", default-features = false, features = ["serde", "more_lengths"]}
|
||||
memmap = "0.7.0"
|
||||
memmap2 = "0.1.0"
|
||||
|
||||
[build-dependencies]
|
||||
rustc_version = "0.2"
|
||||
|
|
|
@ -415,9 +415,9 @@ impl<T: std::cmp::Ord + AbiExample> AbiExample for BTreeSet<T> {
|
|||
}
|
||||
|
||||
#[cfg(not(target_arch = "bpf"))]
|
||||
impl AbiExample for memmap::MmapMut {
|
||||
impl AbiExample for memmap2::MmapMut {
|
||||
fn example() -> Self {
|
||||
memmap::MmapMut::map_anon(1).expect("failed to map the data file")
|
||||
memmap2::MmapMut::map_anon(1).expect("failed to map the data file")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1097,13 +1097,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
checksum = "3728d817d99e5ac407411fa471ff9800a778d88a24685968b36824eaf4bee400"
|
||||
|
||||
[[package]]
|
||||
name = "memmap"
|
||||
version = "0.7.0"
|
||||
name = "memmap2"
|
||||
version = "0.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6585fd95e7bb50d6cc31e20d4cf9afb4e2ba16c5846fc76793f11218da9c475b"
|
||||
checksum = "d9b70ca2a6103ac8b665dc150b142ef0e4e89df640c9e6cf295d189c3caebe5a"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"winapi 0.3.8",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -2165,7 +2164,7 @@ dependencies = [
|
|||
"bv",
|
||||
"generic-array 0.14.3",
|
||||
"log",
|
||||
"memmap",
|
||||
"memmap2",
|
||||
"rustc_version",
|
||||
"serde",
|
||||
"serde_derive",
|
||||
|
@ -2274,7 +2273,7 @@ dependencies = [
|
|||
"libc",
|
||||
"libloading",
|
||||
"log",
|
||||
"memmap",
|
||||
"memmap2",
|
||||
"num-derive 0.3.0",
|
||||
"num-traits",
|
||||
"num_cpus",
|
||||
|
@ -2322,7 +2321,7 @@ dependencies = [
|
|||
"lazy_static",
|
||||
"libsecp256k1",
|
||||
"log",
|
||||
"memmap",
|
||||
"memmap2",
|
||||
"num-derive 0.3.0",
|
||||
"num-traits",
|
||||
"pbkdf2",
|
||||
|
|
|
@ -25,7 +25,7 @@ lazy_static = "1.4.0"
|
|||
libc = "0.2.72"
|
||||
libloading = "0.6.2"
|
||||
log = "0.4.8"
|
||||
memmap = "0.7.0"
|
||||
memmap2 = "0.1.0"
|
||||
num-derive = { version = "0.3" }
|
||||
num-traits = { version = "0.2" }
|
||||
num_cpus = "1.13.0"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use log::*;
|
||||
use memmap::MmapMut;
|
||||
use memmap2::MmapMut;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use solana_sdk::{
|
||||
account::Account,
|
||||
|
|
|
@ -22,7 +22,7 @@ full = [
|
|||
"byteorder",
|
||||
"chrono",
|
||||
"generic-array",
|
||||
"memmap",
|
||||
"memmap2",
|
||||
"rand",
|
||||
"rand_chacha",
|
||||
"serde_json",
|
||||
|
@ -48,7 +48,7 @@ hmac = "0.7.0"
|
|||
itertools = "0.9.0"
|
||||
lazy_static = "1.4.0"
|
||||
log = "0.4.8"
|
||||
memmap = { version = "0.7.0", optional = true }
|
||||
memmap2 = { version = "0.1.0", optional = true }
|
||||
num-derive = "0.3"
|
||||
num-traits = "0.2"
|
||||
pbkdf2 = { version = "0.3.0", default-features = false }
|
||||
|
|
|
@ -20,7 +20,7 @@ use crate::{
|
|||
};
|
||||
use bincode::{deserialize, serialize};
|
||||
use chrono::{TimeZone, Utc};
|
||||
use memmap::Mmap;
|
||||
use memmap2::Mmap;
|
||||
use std::{
|
||||
collections::BTreeMap,
|
||||
fmt,
|
||||
|
|
Loading…
Reference in New Issue