Skip to content

jmert/UnixMmap.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UnixMmap

Documentation Build Status DOI

UnixMmap is an alternative to the Julia standard library's Mmap, with the purpose of exposing the Unix memory-mapping interface.

Installation and usage

Installation and loading is as easy as:

pkg> add UnixMmap

julia> using UnixMmap

A file can be memory mapped (read-only by default) by giving the filename and the Array type (optionally with dimensions to give a shape):

julia> UnixMmap.mmap("arbitrary.dat", Vector{Float64})
192-element Vector{Float64}:
 0.0
 0.0
 
 0.0
 0.0

julia> UnixMmap.mmap("arbitrary.dat", Matrix{Float64}, (64, 3))
64×3 Matrix{Float64}:
 0.0  0.0  0.0
 0.0  0.0  0.0
 
 0.0  0.0  0.0
 0.0  0.0  0.0

while an anonymous memory map can be created by instead specifying the Array type and dimensions:

julia> UnixMmap.mmap(Matrix{Float64}, (128, 3))
128×3 Matrix{Float64}:
 0.0  0.0  0.0
 0.0  0.0  0.0
 
 0.0  0.0  0.0
 0.0  0.0  0.0

About

A Julia package that exposes the Unix mmap interfaces

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages