https://github.com/samth/mmap
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/samth/mmap
- Owner: samth
- Created: 2017-01-26T15:38:53.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2021-01-03T21:15:07.000Z (over 5 years ago)
- Last Synced: 2025-10-10T13:38:22.056Z (8 months ago)
- Language: Racket
- Size: 2.93 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
##### mmap
A binding to the system `mmap()`.
###### Installation
```
$ raco pkg install mmap
```
###### Example
```
$ cat /tmp/x
111111111111111111111111111111111111111111111111111111111111111111111
$ racket
> (require mmap)
> (define bs (mmap "/tmp/x" #:length 20 #:prot '(PROT_READ PROT_WRITE) #:flags 'MAP_SHARED))
> bs
#"11111111111111111111"
> (bytes-set! bs 0 50)
> bs
#"21111111111111111111"
>
$ cat /tmp/x
211111111111111111111111111111111111111111111111111111111111111111111
```