PetscMalloc petsc-3.0.0-p4

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


On Mon, Mar 23, 2009 at 5:49 PM, David Fuentes <fuentesdt at gmail.com> 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.

  Matt


>
> thanks,
> df
>
-- 
What most experimenters take for granted before they begin their experiments
is infinitely more interesting than any results to which their experiments
lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20090323/bace8f71/attachment-0001.htm>


More information about the petsc-users mailing list