Skip to content

Commit

Permalink
Updated Readme
Browse files Browse the repository at this point in the history
  • Loading branch information
calcinai committed Jun 4, 2016
1 parent fb922e7 commit c1d3c17
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,28 @@ you're reading large amounts of data it can be done piece by piece.

I have tried to make it functionally equivalent to c's implementation, but it's not quite complete due to some limitations.

It would be nice for this to develop into a native php extension that can be phpize'd as a post install if the environment supports it.
It would be nice for this to develop into a native php extension that can be phpize'd as a post install if the environment supports it.

## Setup

Using composer:

```json
"require": {
"calcinai/php-mmap": "^0.1"
}
```

## Usage

Via a URI (of sorts)
```php
$mmap = fopen('mmap:///dev/mem:1024?offset=0', 'rw');
```

Via wrapper method
```php
$mmap = mmap_open('/dev/mem', 1024, 0);
```

You can use `fseek()`, `fread()` and `fwrite()` on the stream. If you have a use for others, let me know.

0 comments on commit c1d3c17

Please sign in to comment.