PetscMalloc petsc-3.0.0-p4

Matthew Knepley knepley at
Mon Mar 23 18:01:18 CDT 2009

On Mon, Mar 23, 2009 at 5:49 PM, David Fuentes <fuentesdt at> wrote:

> In 3.0.0-p4
> PetscMalloc doesn't seem to return an error code if the requested memory
> wasn't allocated ? Is this correct ?
> I'm trying to allocate a dense matrix for which there was not enough memory
> and PetscMalloc is returning a null pointer but no errorcode to
> catch. which is causing seg faults later.

No, PETSc definitely returns an error code if the malloc fails.


> thanks,
> df
What most experimenters take for granted before they begin their experiments
is infinitely more interesting than any results to which their experiments
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the petsc-users mailing list