prometheus-client-mmap 0.7.0.beta45.8 → 0.7.0.beta45.9
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/ext/fast_mmaped_file/value_access.c +8 -4
- data/lib/fast_mmaped_file.bundle +0 -0
- data/lib/prometheus/client/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: 26cd3edd6cdca37f12302661dcc43f4ef1fa2426
|
4
|
+
data.tar.gz: 572236f8217e968c1f2f229a8b4303e570ad838f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a5b3f0d352da5227e3611bb246105f5a5f1e4f28addaa1ab99ed942e56a502b135b205e83e8fb55972337c851665ba396904821310ac1b3d1722d29ab4753110
|
7
|
+
data.tar.gz: e0e9af3be98632d44649882878aa5d20349187010746b7dffa84586910a469ae46a2197f73d915d351c1112905c8152c93dfe9bb42fe94d222fdad24587ef3bb
|
@@ -34,12 +34,14 @@ static int open_and_extend_file(mm_ipc *i_mm, size_t len, int *fd_p) {
|
|
34
34
|
}
|
35
35
|
|
36
36
|
static int perform_munmap(mm_ipc *i_mm) {
|
37
|
-
if (i_mm->t->addr
|
38
|
-
i_mm->t->addr =
|
37
|
+
if (i_mm->t->addr != NULL && munmap(i_mm->t->addr, i_mm->t->len)) {
|
38
|
+
i_mm->t->addr = NULL;
|
39
39
|
return with_exception(rb_eArgError, "munmap failed");
|
40
40
|
}
|
41
41
|
|
42
|
-
i_mm->t->addr =
|
42
|
+
i_mm->t->addr = NULL;
|
43
|
+
i_mm->t->len = 0;
|
44
|
+
i_mm->t->real = 0;
|
43
45
|
|
44
46
|
return SUCCESS;
|
45
47
|
}
|
@@ -50,6 +52,7 @@ static int perform_mmap(mm_ipc *i_mm, int fd, size_t len) {
|
|
50
52
|
if (addr == MAP_FAILED) {
|
51
53
|
return with_exception(rb_eArgError, "mmap failed");
|
52
54
|
}
|
55
|
+
|
53
56
|
i_mm->t->addr = addr;
|
54
57
|
i_mm->t->len = len;
|
55
58
|
i_mm->t->real = len;
|
@@ -66,7 +69,8 @@ static int expand(mm_ipc *i_mm, size_t len) {
|
|
66
69
|
return FAILURE;
|
67
70
|
}
|
68
71
|
|
69
|
-
int fd;
|
72
|
+
int fd = 0;
|
73
|
+
|
70
74
|
if (!open_and_extend_file(i_mm, len, &fd)) {
|
71
75
|
return FAILURE;
|
72
76
|
}
|
data/lib/fast_mmaped_file.bundle
CHANGED
Binary file
|