You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+38-32Lines changed: 38 additions & 32 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,15 +1,15 @@
1
-
###########
2
-
Motivation
3
-
###########
1
+
## Motivation
2
+
4
3
When reading from many possibly large files in a fashion similar to random access, it is usually the fastest and most efficient to use memory maps.
5
4
6
5
Although memory maps have many advantages, they represent a very limited system resource as every map uses one file descriptor, whose amount is limited per process. On 32 bit systems, the amount of memory you can have mapped at a time is naturally limited to theoretical 4GB of memory, which may not be enough for some applications.
Smmap wraps an interface around mmap and tracks the mapped files as well as the amount of clients who use it. If the system runs out of resources, or if a memory limit is reached, it will automatically unload unused maps to allow continued operation.
15
15
@@ -21,42 +21,49 @@ Although the library can be used most efficiently with its native interface, a B
21
21
22
22
For performance critical 64 bit applications, a simplified version of memory mapping is provided which always maps the whole file, but still provides the benefit of unloading unused mappings on demand.
23
23
24
-
#############
25
-
Prerequisites
26
-
#############
24
+
25
+
26
+
## Prerequisites
27
+
27
28
* Python 2.4, 2.5 or 2.6
28
29
* OSX, Windows or Linux
29
30
30
31
The package was tested on all of the previously mentioned configurations.
31
32
32
-
###########
33
-
Limitations
34
-
###########
33
+
34
+
35
+
## Limitations
36
+
35
37
* The memory access is read-only by design.
36
38
* In python below 2.6, memory maps will be created in compatibility mode which works, but creates inefficient memory mappings as they always start at offset 0.
37
39
* It wasn't tested on python 2.7 and 3.x.
38
40
39
-
################
40
-
Installing smmap
41
-
################
42
-
Its easiest to install smmap using the *easy_install* or *pip* program, which is part of the `setuptools`_ or `pip`_ respectively::
41
+
42
+
## Installing smmap
43
+
44
+
Its easiest to install smmap using the *easy_install* or *pip* program, which is part of the [setuptools](http://peak.telecommunity.com/DevCenter/setuptools) or [pip](http://www.pip-installer.org/en/latest) respectively:
43
45
44
-
$ easy_install smmap
45
-
# or
46
-
$ pip install smmap
46
+
```bash
47
+
$ easy_install smmap
48
+
# or
49
+
$ pip install smmap
50
+
```
47
51
48
52
As the command will install smmap in your respective python distribution, you will most likely need root permissions to authorize the required changes.
49
53
50
-
If you have downloaded the source archive, the package can be installed by running the ``setup.py`` script::
54
+
If you have downloaded the source archive, the package can be installed by running the `setup.py` script:
51
55
52
-
$ python setup.py install
56
+
```bash
57
+
$ python setup.py install
58
+
```
59
+
60
+
It is advised to have a look at the **Usage Guide** for a brief introduction on the different database implementations.
61
+
53
62
54
-
It is advised to have a look at the :ref:`Usage Guide <tutorial-label>` for a brief introduction on the different database implementations.
55
63
56
-
##################
57
-
Homepage and Links
58
-
##################
59
-
The project is home on github at `https://github.com/Byron/smmap <https://github.com/Byron/smmap>`_.
64
+
## Homepage and Links
65
+
66
+
The project is home on github at https://github.com/Byron/smmap .
60
67
61
68
The latest source can be cloned from github as well:
0 commit comments