mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
24 lines
439 B
Go
24 lines
439 B
Go
// +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)
|