From e90982cb2ef01fd43ae93c729a5a5828ca345c44 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Mon, 30 Dec 2024 23:08:43 -0300 Subject: src/dedo.go: Remove Options.InitialMmapSize option --- src/dedo.go | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'src') diff --git a/src/dedo.go b/src/dedo.go index 437680b..b81b55b 100644 --- a/src/dedo.go +++ b/src/dedo.go @@ -176,15 +176,6 @@ type panicked struct { // Options represents the options that can be set when opening a database. type Options struct { - // InitialMmapSize is the initial mmap size of the database - // in bytes. Read transactions won't block write transaction - // if the InitialMmapSize is large enough to hold database mmap - // size. (See DB.Begin for more information) - // - // If <=0, the initial map size is 0. - // If initialMmapSize is smaller than the previous database size, - // it takes no effect. - InitialMmapSize int } // Stats represents statistics about the database. @@ -1882,7 +1873,7 @@ func Open(path string, mode os.FileMode, options *Options) (*DB, error) { } // Memory map the data file. - if err := db.mmap(options.InitialMmapSize); err != nil { + if err := db.mmap(0); err != nil { _ = db.close() return nil, err } -- cgit v1.2.3