mmap2 2.2.9alpha3 → 2.2.9alpha4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/mmap/mmap.c +2 -0
- data/lib/mmap/version.rb +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: dca7a218ae263697740dad4a0e4e06d06ad447a9
|
4
|
+
data.tar.gz: ed857acb2e5d7009dbfc395ba932663df1f6f462
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2db8ffa0e4e01156969d7c16a0059bb0c8b5fb5ecdc4022fa524e5e60d384baae3be38df681f62572b66d3a5c124cc24e2e644fcc5c5bbbf6ffd285871e9d337
|
7
|
+
data.tar.gz: 0dd996c75a92bd419558a4469aeb2400c1946d0be023bcf2021837071e852053cb2e8769c0f10f96452d5c8635bac7bb74600434904f47954b8cb99d54ae4ebe
|
data/ext/mmap/mmap.c
CHANGED
@@ -381,6 +381,7 @@ static VALUE mm_i_expand(st_mm) mm_st *st_mm;
|
|
381
381
|
if ((fd = open(i_mm->t->path, i_mm->t->smode)) == -1) {
|
382
382
|
rb_raise(rb_eArgError, "Can't open %s", i_mm->t->path);
|
383
383
|
}
|
384
|
+
DEBUGF("mm_i_expand: old len %d, new len %d", i_mm->t->len, len);
|
384
385
|
if (len > i_mm->t->len) {
|
385
386
|
if (lseek(fd, len - i_mm->t->len - 1, SEEK_END) == -1) {
|
386
387
|
rb_raise(rb_eIOError, "Can't lseek %lu", len - i_mm->t->len - 1);
|
@@ -406,6 +407,7 @@ static VALUE mm_i_expand(st_mm) mm_st *st_mm;
|
|
406
407
|
rb_raise(rb_eArgError, "mlock(%d)", errno);
|
407
408
|
}
|
408
409
|
i_mm->t->len = len;
|
410
|
+
DEBUGF("mm_i_expand: new len %d", i_mm->t->len);
|
409
411
|
return Qnil;
|
410
412
|
}
|
411
413
|
|
data/lib/mmap/version.rb
CHANGED