[petsc-users] Mat Destroy
Barry Smith
bsmith at mcs.anl.gov
Fri Aug 23 16:39:41 CDT 2013
On Aug 23, 2013, at 4:28 PM, Michael Povolotskyi <mpovolot at purdue.edu> wrote:
> Dear Petsc developers,
> I have a question about the MatDestroy function.
> Does it free the memory immediately?
> Or do you keep the memory for further usage?
We call free() at that point. But not that in Unix this does not mean the memory is returned to the operating system so you will not see the process memory go down. If you then allocate new objects they will reuse this memory.
Barry
>
> Thank you,
> Michael.
>
> --
> Michael Povolotskyi, PhD
> Research Assistant Professor
> Network for Computational Nanotechnology
> 207 S Martin Jischke Drive
> Purdue University, DLR, room 441-10
> West Lafayette, Indiana 47907
>
> phone: +1-765-494-9396
> fax: +1-765-496-6026
>
More information about the petsc-users
mailing list