jemalloc consistent use of bool?...
jasone at canonware.com
Sun Jun 1 21:43:37 PDT 2014
On May 29, 2014, at 3:41 PM, Paul Pedriana <ppedriana at gmail.com> wrote:
> While tracing through the jemalloc source code, I noticed that it seems to use bool inconsistently with respect to success/failure. Sometimes true means success and false means failure, while other times it's the reverse. For example, the prof_dump_flush function returns true upon success and false upon error. But the malloc_init_hard function returns false upon success and true upon failure. There appear to be cases of functions acting both ways. Or am I misreading the code?
The intention is for true to indicate error, and false to indicate success (no error). In the case of prof_dump_flush(), it looks to me like it follows this convention. Are there additional functions you noticed that appear to deviate?
More information about the jemalloc-discuss