mincore 0.0.9.3.pre.3 → 0.0.9.3.pre.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +2 -1
- data/bin/cachestats.rb +3 -0
- data/lib/mincore.rb +2 -3
- data/mincore.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e9f7ed3bda0a02591d38392a11fb0906562ca7a2
|
4
|
+
data.tar.gz: d8db4334abdcb06c931707fc75b4189df655dade
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 869372b716f6e29725ac8e9adc52b09085069d163be039cd2a91ee7353ab3ccd870689ae5e3334186d199f54b0d39f3166431f4df646fbc8f71d9acdb28b4dbc
|
7
|
+
data.tar.gz: fe5585b123880aa011ee2b27f387f3ff072cb6d5884debad296de87fcd3bdf953f50934673830380b7762c0ef3b6f67894edd0998720fb504f594d738a224963
|
data/README.md
CHANGED
@@ -18,7 +18,8 @@ This project is heavily inspired from [Feh/nocache](http://github.com/Feh/nocach
|
|
18
18
|
IMPORTANT
|
19
19
|
=========
|
20
20
|
|
21
|
-
Versions <= 0.0.9.2 have a buggy File.mincore()
|
21
|
+
Versions <= 0.0.9.2 have a buggy File.mincore().
|
22
|
+
Versions 0.0.9.3 and upwards work.
|
22
23
|
|
23
24
|
|
24
25
|
Usage
|
data/bin/cachestats.rb
CHANGED
data/lib/mincore.rb
CHANGED
@@ -89,7 +89,6 @@ static VALUE _mincore(char *filename) {
|
|
89
89
|
pageinfo_arr = rb_ary_new2(pages);
|
90
90
|
for(i=0; i<pages; i++) {
|
91
91
|
VALUE status = ((pageinfo[i] & 1)?Qtrue:Qfalse);
|
92
|
-
// VALUE status = Qtrue;
|
93
92
|
rb_ary_push(pageinfo_arr, status);
|
94
93
|
}
|
95
94
|
|
@@ -171,10 +170,10 @@ C_CODE
|
|
171
170
|
# ( filesize + PAGESIZE -1 ) / PAGESIZE
|
172
171
|
#
|
173
172
|
# @example Sample run - on a file of size 20KB
|
174
|
-
# File.mincore("/path/to/important/file") #=> [true, true, true, false, false]
|
173
|
+
# File.mincore("/path/to/important/file") #=> [0, [true, true, true, false, false]]
|
175
174
|
#
|
176
175
|
# @param filename [String] file name
|
177
|
-
# @return [Int] execution status
|
176
|
+
# @return [Int, Array] execution status and cache status array
|
178
177
|
def self.mincore(filename)
|
179
178
|
self._mincore(filename)
|
180
179
|
end
|
data/mincore.gemspec
CHANGED