PetscMalloc petsc-3.0.0-p4

Lisandro Dalcin dalcinl at
Mon Mar 23 18:20:20 CDT 2009

1) Which system are you running on?

2) are you completely sure BOTH things happens, I mean... that malloc
returns null AND the error code is zero?

On Mon, Mar 23, 2009 at 7: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.
> thanks,
> df

Lisandro Dalcín
Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC)
Instituto de Desarrollo Tecnológico para la Industria Química (INTEC)
Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET)
PTLC - Güemes 3450, (3000) Santa Fe, Argentina
Tel/Fax: +54-(0)342-451.1594

More information about the petsc-users mailing list