-
Notifications
You must be signed in to change notification settings - Fork 634
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Windows CreateFileMapping: Not enough memory resources #252
Comments
I'm working on a PR for an etcd snapshot feature, I fixed an issue in that PR but then I'm running into this issue. I notice the CreateFileMapping call from the Windows API has the parameters as Does this fix look right? I'm not really a go developer so I don't know how I'd go about testing this but I can submit a PR blind if this is a straightforward. index 09e00b6..a5a08e9 100644
--- a/bolt_windows.go
+++ b/bolt_windows.go
@@ -72,7 +72,7 @@ func mmap(db *DB, sz int) error {
// Open a file mapping handle.
sizelo := uint32(sz >> 32)
sizehi := uint32(sz) & 0xffffffff
- h, errno := syscall.CreateFileMapping(syscall.Handle(db.file.Fd()), nil, syscall.PAGE_READONLY, sizelo, sizehi, nil)
+ h, errno := syscall.CreateFileMapping(syscall.Handle(db.file.Fd()), nil, syscall.PAGE_READONLY, sizehi, sizelo, nil)
if h == 0 {
return os.NewSyscallError("CreateFileMapping", errno)
} |
This issue should have already been fixed, Line 79 in 0cecda6
|
I have a issue opening large DB files on Windows.
The code does not do much here: https://github.com/lunemec/ed-router/blob/96c8fa872b48b5eb83c6afb2b31b24d8106ddbc5/pkg/db/boltdb/boltdb.go#L46
The error I get:
The DB files I have are pretty big:
The strange thing is, this code works just fine on my MacOS MBP with only 4GB Ram, but not on my Windows machine with 32GB ram, even with swap file enabled to up to 32GB.
How do I open these large databases on windows?
I run Windows 10 Home, version 1083, build 17134.1069 64bit.
The text was updated successfully, but these errors were encountered: