Lisandro Dalcin <[email protected]> writes:
> 2) https://bitbucket.org/petsc/petsc/branch/dalcinl/petscmalloc-1
>
> This one no longer special-cases zero-sized allocations. It fixes all
> the PetscMallocK() macros.
>
> If we ever find a system where system malloc(0) returns NULL, 

Why is this a problem?  I would just accept what malloc(0) returns.

> we can use an obvious approach like in Python sources:
> https://hg.python.org/cpython/file/582e8e71f635/Objects/obmalloc.c#l53

Yuck.  This can hide real off-by-one errors from Valgrind.

Attachment: signature.asc
Description: PGP signature

Reply via email to