Oran Agra 5def65008f Fix zrealloc to behave similarly to je_realloc when size is 0
According to C11, the behavior of realloc with size 0 is now deprecated.
it can either behave as free(ptr) and return NULL, or return a valid pointer.
but in zmalloc it can lead to zmalloc_oom_handler and panic.
and that can affect modules that use it.

It looks like both glibc allocator and jemalloc behave like so:
  realloc(malloc(32),0) returns NULL
  realloc(NULL,0) returns a valid pointer

This commit changes zmalloc to behave the same
2018-02-21 11:04:13 +02:00
..
2016-04-25 16:49:57 +03:00
2016-06-07 16:46:00 -04:00
2017-08-08 17:45:51 +08:00
2016-04-04 08:50:58 +02:00
2015-10-01 13:02:25 +02:00
2017-12-05 15:38:03 +01:00
2017-12-05 15:38:03 +01:00
2017-12-05 15:38:03 +01:00
2016-07-27 11:34:25 +02:00
2016-07-27 11:34:25 +02:00
2016-06-14 14:45:28 +02:00
2018-02-14 00:12:13 +09:00
2014-08-08 10:05:32 +02:00
2017-01-18 17:12:07 +01:00
2015-04-27 12:07:49 +02:00
2015-04-27 12:07:49 +02:00
2017-02-21 17:07:28 +01:00
2014-07-02 16:31:22 +02:00
2017-12-05 17:42:19 +08:00
2017-01-11 19:24:19 +02:00