iodine 0.2.8 → 0.2.9

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of iodine might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fc35ddb10525599dcaacd5746e7ad1b6b5798d25
4
- data.tar.gz: abb7a77d1f0e9e224037aea022d3b58964d24459
3
+ metadata.gz: ba4e058f674e3984cdee2cff5cb107c1b2563ecf
4
+ data.tar.gz: 6d733dd6ab5daea3464b2a2f2e1567e9781361a8
5
5
  SHA512:
6
- metadata.gz: 47ae99c46deb8aac630e8b096a0478fb45e1d7aa732f988ca111ebcbc55e13e74fa6c816c27d4f826f89ec0de2ab82b75c0ecf5495a0d560eae54556db6dde87
7
- data.tar.gz: 810d41cbe10ca2683eb9d6fadbd02cc66df8c6ae55cf1857be6aae4208e1988884f9b24b8240497d435d4ddd9409f7b30f1f0492a7382c0900c870d8d11651da
6
+ metadata.gz: 2acca1d13ceb9bfa682fe1f7aa1175349d3d092c15747b700785f9ad5117f7714ee851ac5e61cebf93c31bee793f4af38ecff504d780fdd65c575c42ab3c04a7
7
+ data.tar.gz: 8f182b7d745804676f2f7837f36f92419fdd7c1c740cd1a3f9fbfc66c25dbf16eb0c2f11b8454d6ecc30e4be5992c7a0c77f707e3c6f2a52962dbf4979f16fe2
@@ -8,6 +8,12 @@ Please notice that this change log contains changes for upcoming releases as wel
8
8
 
9
9
  ***
10
10
 
11
+ Change log v.0.2.9
12
+
13
+ **Fix**: fixed a gcc-4.8 compatibility issue that prevented iodine 0.2.8 from compiling on Heroku's cedar-14 stack. This was related to missing system include files in gcc-4.8. It should be noted that Heroku's stack and compiler (which utilizes Ubuntu 14) has known issues and / or limited support for some of it's published features... but I should have remembered that before releasing version 0.2.8... sorry about that.
14
+
15
+ ***
16
+
11
17
  Change log v.0.2.8
12
18
 
13
19
  **Memory Performance**: The Websocket connection Protocol now utilizes both a C level memory pool and a local thread storage for temporary data. This helps mitigate possible memory fragmentation issues related to long running processes and long-lived objects. In addition, the socket `read` buffer was moved from the protocol object to a local thread storage (assumes pthreads and not green threads). This minimizes the memory footprint for each connection (at the expense of memory locality) and should allow Iodine to support more concurrent connections using less system resources. Last, but not least, the default message buffer per connection starts at 4Kb instead of 16Kb (grows as needed, up to `Iodine::Rack.max_msg_size`), assuming smaller messages are the norm.
@@ -116,14 +116,11 @@ Memory block allocation
116
116
  /* check for unix support */
117
117
  # if __has_include(<unistd.h>) && __has_include(<sys/mman.h>)
118
118
  # define HAS_UNIX_FEATURES
119
+ # include <unistd.h>
119
120
  # endif
120
121
  #endif
121
122
  // clang-format on
122
123
 
123
- #ifdef HAS_UNIX_FEATURES
124
- #include <sys/mman.h>
125
- #include <unistd.h>
126
-
127
124
  /* *****************************************************************************
128
125
  spnlock.h (can also be embeded instead of included)
129
126
  */
@@ -133,13 +130,16 @@ spnlock.h (can also be embeded instead of included)
133
130
  Memory slices, tree and helpers
134
131
  */
135
132
 
133
+ struct mempool_reserved_slice_s_offset { /** offset from this slice */
134
+ uint32_t reserved1; /* used to make the offset 16 bytes long */
135
+ uint32_t ahead;
136
+ uint32_t behind;
137
+ uint32_t reserved2; /* used to make the offset 16 bytes long */
138
+ };
139
+
136
140
  typedef struct mempool_reserved_slice_s {
137
- struct mempool_reserved_slice_s_offset { /** offset from this slice */
138
- uint32_t reserved1; /* used to make the offset 16 bytes long */
139
- uint32_t ahead;
140
- uint32_t behind;
141
- uint32_t reserved2; /* used to make the offset 16 bytes long */
142
- } offset;
141
+ /** offset from this slice */
142
+ struct mempool_reserved_slice_s_offset offset;
143
143
  /** Used for the free slices linked list. */
144
144
  struct mempool_reserved_slice_s *next;
145
145
  struct mempool_reserved_slice_s *prev;
@@ -168,6 +168,8 @@ static struct {
168
168
  /* *****************************************************************************
169
169
  Memory Block Allocation / Deallocation
170
170
  */
171
+ #ifdef HAS_UNIX_FEATURES
172
+ #include <sys/mman.h>
171
173
 
172
174
  #define MEMPOOL_ALLOC_SPECIAL(target, size) \
173
175
  do { \
@@ -204,6 +206,7 @@ static __unused void *mempool_malloc(size_t size) {
204
206
  if (size & 15) {
205
207
  size = (size & (~16)) + 16;
206
208
  }
209
+
207
210
  size += sizeof(struct mempool_reserved_slice_s_offset);
208
211
 
209
212
  mempool_reserved_slice_s *slice = NULL;
@@ -1,3 +1,3 @@
1
1
  module Iodine
2
- VERSION = '0.2.8'.freeze
2
+ VERSION = '0.2.9'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: iodine
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.8
4
+ version: 0.2.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Boaz Segev