Browse Source
Rename mem_map to mMap, remove some in_memory variables being passed around, added MemoryMapped member to volume struct
pull/1087/head
Rename mem_map to mMap, remove some in_memory variables being passed around, added MemoryMapped member to volume struct
pull/1087/head
j.laycock
5 years ago
17 changed files with 98 additions and 79 deletions
-
2weed/command/backup.go
-
6weed/command/compact.go
-
2weed/server/volume_grpc_vacuum.go
-
23weed/storage/memory_map/memory_map.go
-
48weed/storage/memory_map/memory_map_windows.go
-
18weed/storage/needle/needle_read_write.go
-
4weed/storage/store.go
-
4weed/storage/store_vacuum.go
-
7weed/storage/volume.go
-
2weed/storage/volume_create.go
-
2weed/storage/volume_create_linux.go
-
15weed/storage/volume_create_windows.go
-
6weed/storage/volume_loading.go
-
4weed/storage/volume_read_write.go
-
10weed/storage/volume_super_block.go
-
20weed/storage/volume_vacuum.go
-
4weed/storage/volume_vacuum_test.go
@ -0,0 +1,23 @@ |
|||
// +build !windows
|
|||
|
|||
package memory_map |
|||
|
|||
import "os" |
|||
|
|||
type MemoryBuffer struct { |
|||
aligned_length uint64 |
|||
length uint64 |
|||
aligned_ptr uintptr |
|||
ptr uintptr |
|||
Buffer []byte |
|||
} |
|||
|
|||
type MemoryMap struct { |
|||
File *os.File |
|||
file_memory_map_handle uintptr |
|||
write_map_views []MemoryBuffer |
|||
max_length uint64 |
|||
End_Of_File int64 |
|||
} |
|||
|
|||
var FileMemoryMap = make(map[string]MemoryMap) |
Write
Preview
Loading…
Cancel
Save
Reference in new issue