linksplatform / Data.Doublets

LinksPlatform's Platform.Data.Doublets Class Library
https://linksplatform.github.io/Data.Doublets/
The Unlicense
14 stars 6 forks source link

Segmentation fault #357

Closed Mitron57 closed 2 years ago

Mitron57 commented 2 years ago

If you launch this code, you get SIGSEGV

fn bug() {
    let file = std::fs::File::options()
        .create(true)
        .write(true)
        .read(true)
        .open("db.links")
        .unwrap();
    let mem = FileMappedMem::new(file).unwrap();
    let mut store = unit::Store::<usize, _>::new(storage).unwrap();
    for _ in 0..1_000_000 {
        store.create_point().unwrap();
    }
    store.delete_all().unwrap();
}
uselessgoddess commented 2 years ago

I checked it. .delete_all() has no effect. Please try use my new commit from mem repository

[dependencies]
mem = { git = "https://github.com/linksplatform/Memory", package = "platform-mem" }
Mitron57 commented 2 years ago

Ok, i'll check it

uselessgoddess commented 2 years ago

Ok, i'll check it

It works?

uselessgoddess commented 2 years ago

Hey bro @Mitron57

uselessgoddess commented 2 years ago

I think it works in the pre+beta version.2 and later. I close issue

uselessgoddess commented 2 years ago

Check changes

Mitron57 commented 2 years ago

Oh, sorry, I didn't give feedback. It works fine, thanks. I will use your changes. 🙂