Commit Graph

9 Commits

Author SHA1 Message Date
Michael Grunder
8e0264cfd6
Allow users to replace allocator and handle OOM everywhere. (#800)
* Adds an indirection to every allocation/deallocation to allow users to 
  plug in ones of their choosing (use custom functions, jemalloc, etc).

* Gracefully handle OOM everywhere in hiredis.  This should make it possible
  for users of the library to have more flexibility in how they handle such situations.

* Changes `redisReaderTask->elements` from an `int` to a `long long` to prevent
  a possible overflow when transferring the task elements into a `redisReply`.

* Adds a configurable `max elements` member to `redisReader` that defaults to
  2^32 - 1.  This can be set to "unlimited" by setting the value to zero.
2020-05-22 09:27:49 -07:00
Michael Grunder
a5613f3f7f
Use correct libuv call on Windows (#784)
Explicitly call `uv_poll_init_socket` as that has slightly different semantics on Windows (and is identical to `uv_poll_init` on Linux).

http://docs.libuv.org/en/v1.x/poll.html#c.uv_poll_init_socket
2020-04-09 12:39:49 -07:00
Yossi Gottlieb
9ce15c4b39 Fix errors not propagating properly with libuv.h. 2018-11-04 10:04:53 +02:00
Paul Scott
cbb956567b Prevented uv adapter from calling write when context has been freed 2016-09-19 11:48:54 +10:00
torque
9c57314489 Cleanup libuv adapter
This:
  - Removes misplaced libuv function prototype
  - Includes stdlib for free()

Closes #251
2015-01-05 16:38:57 -05:00
Charlie Somerville
4ede1bada1 Define redisLibuvAttach as static
Closes #206
2014-04-09 17:02:42 -04:00
John Graham
f20f5ad102 Libuv: Fix compile warnings and C++ compatability
Closes #189
2014-04-09 17:02:42 -04:00
Erik Dubbelboer
0396159214 Removed unnecessary comments 2013-06-09 14:43:03 +02:00
Erik Dubbelboer
61277d0925 Added libuv adapter 2013-06-04 15:06:43 +02:00