Commit Graph

5 Commits

Author SHA1 Message Date
Michael Grunder f5d2585043
Use unique names for allocator struct members (#823)
Using `strdup` as a struct member causes issues in older gcc
2020-05-25 12:17:43 -07:00
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 d57067564e Actually define include guard 2020-03-13 10:57:06 -07:00
Michael Grunder 38675d23cc
Housekeeping fixes (#764)
Housekeeping

* Check for C++ (#758, #750) 
* Include `alloc.h` in `make install` and `cmake`
* Add a `.def` file for Windows (#760)
* Include allocation wrappers referenced in adapter headers
* Fix minor syntax errors and typos in README
* Fix CI in Windows by properly escaping arguments (#761)
2020-02-27 21:29:05 -08:00
Michael Grunder 669ac9d0c8
Safe allocation wrappers (#754)
Create allocation wrappers with a configurable OOM handler (defaults to abort()).

See #752, #747
2020-01-28 12:13:05 -08:00