mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 02:12:23 +00:00
Add comments for mmap package usage
This commit is contained in:
parent
378d314b25
commit
318008331f
1 changed files with 2 additions and 1 deletions
|
|
@ -64,7 +64,8 @@ func isLittleEndian() bool {
|
||||||
}
|
}
|
||||||
|
|
||||||
// memoryMap tries to memory map a file of uint32s for read only access.
|
// memoryMap tries to memory map a file of uint32s for read only access.
|
||||||
// mmap is a portable memory map package which would enable direct access for memory mapping files
|
// mmap is a portable memory map package which would enable direct access for
|
||||||
|
// memory mapping files
|
||||||
func memoryMap(path string) (*os.File, mmap.MMap, []uint32, error) {
|
func memoryMap(path string) (*os.File, mmap.MMap, []uint32, error) {
|
||||||
file, err := os.OpenFile(path, os.O_RDONLY, 0644)
|
file, err := os.OpenFile(path, os.O_RDONLY, 0644)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue