mmap

包 mmap 提供了一个内存映射文件的接口。「Package mmap provides an interface to memory mapped files.」

  • Owner: go-util/mmap
  • Platform:
  • License:: MIT License
  • Category::
  • Topic:
  • Like:
    0
      Compare:

Github stars Tracking Chart

mmap

GoDoc
Build Status
Go Report Card
Coverage

Package mmap provides an interface to memory mapped files.

Memory maps can be opened as read-only with Read or read-write with Write.
To specify additional flags and a file mode use Open.

There are two different ways to work with memory maps.
They cannot be used simultaneously.
Creating a Direct accessor will fail if any Readers or Writers are open.
Creating Reader or Writer will fail if any Direct accessors are open.

The first is through direct access via a Direct, which is a pointer to a byte slice.
This lets you write directly to the mapped memory, but you will need to manage access
between go routines.

The second is through Readers and Writers.
These implement the standard interfaces from the io package and can be treated like files
while still benefitting from the improved performance of memory mapping.

You can have multiple Readers and Writers.
The map will ensure that writes don't conflict with reads. That is, the underlying map
won't change during the middle of a read.

When the map is resized via Truncate, all open Direct, Reader, and Writer objects are closed.

Main metrics

Overview
Name With Ownergo-util/mmap
Primary LanguageGo
Program languageGo (Language Count: 1)
Platform
License:MIT License
所有者活动
Created At2017-07-26 13:29:19
Pushed At2018-10-07 18:22:09
Last Commit At2018-10-07 14:22:04
Release Count1
Last Release Namev0.0.1 (Posted on 2018-09-22 23:28:50)
First Release Namev0.0.1 (Posted on 2018-09-22 23:28:50)
用户参与
Stargazers Count25
Watchers Count4
Fork Count3
Commits Count20
Has Issues Enabled
Issues Count0
Issue Open Count0
Pull Requests Count0
Pull Requests Open Count0
Pull Requests Close Count0
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private