[petsc-dev] malloc_dump noise from threadcomm
Jed Brown
jedbrown at mcs.anl.gov
Sat Dec 8 10:32:38 CST 2012
Okay with me, it's easy to change later.
On Dec 8, 2012 7:49 AM, "Shri" <abhyshr at mcs.anl.gov> wrote:
>
> On Dec 8, 2012, at 9:29 AM, Jed Brown wrote:
>
> > threadcomm.c has this thing
> >
> > for (i=0;i<PETSC_KERNELS_MAX;i++) {
> > ierr = PetscNew(struct
> _p_PetscThreadCommJobCtx,&PetscJobQueue->jobs[i]);CHKERRQ(ierr);
> >
> >
> > that gets freed when the last PetscObject gets destroyed. But if the
> user forgets to Destroy something, this shows up as a memory leak. Since
> the relevant malloc_dump output is much higher in the stack, this is
> confusing noise, and I'd like to eliminate it. We can either
> >
> > 1. not log this memory at all by calling malloc or posix_memalign
> directly
> >
> > 2. put code into PetscFinalize that ensures that this stuff has been
> freed (very messy if user does anything weird with communicators)
> >
> > 3. add way to mark PetscTrMalloc'd memory as "indirect" so that it is
> not reported by default
>
> We can go with 1 for now??
>
> Shri
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20121208/e975c7d0/attachment.html>
More information about the petsc-dev
mailing list