aboutsummaryrefslogtreecommitdiff
path: root/weed/storage/volume_create_windows.go
diff options
context:
space:
mode:
Diffstat (limited to 'weed/storage/volume_create_windows.go')
-rw-r--r--weed/storage/volume_create_windows.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/weed/storage/volume_create_windows.go b/weed/storage/volume_create_windows.go
index 62d5a12b9..5b30d3d52 100644
--- a/weed/storage/volume_create_windows.go
+++ b/weed/storage/volume_create_windows.go
@@ -8,7 +8,7 @@ import (
"github.com/joeslay/seaweedfs/weed/storage/memory_map"
"golang.org/x/sys/windows"
- "github.com/chrislusf/seaweedfs/weed/glog"
+ "github.com/joeslay/seaweedfs/weed/glog"
"github.com/joeslay/seaweedfs/weed/os_overloads"
)
@@ -17,8 +17,10 @@ func createVolumeFile(fileName string, preallocate int64) (*os.File, error) {
mem_map, exists := memory_map.FileMemoryMap[fileName]
if !exists {
file, e := os_overloads.OpenFile(fileName, windows.O_RDWR|windows.O_CREAT, 0644, true)
- new_mem_map := memory_map.CreateMemoryMap(file, 2^32)
- memory_map.FileMemoryMap[fileName] = new_mem_map
+ memory_map.FileMemoryMap[fileName] = new(memory_map.MemoryMap)
+
+ new_mem_map := memory_map.FileMemoryMap[fileName]
+ new_mem_map.CreateMemoryMap(file, 1024*1024*1024*4)
if preallocate > 0 {
glog.V(0).Infof("Preallocated disk space for %s is not supported", fileName)