| #
9beb8f72
|
| 07-Aug-2023 |
Toby Isaac <toby.isaac@gmail.com> |
Sys: Introduce -on_error_malloc_dump and PETSC_ERR_MEM_LEAK
To avoid a malloc dump that swamps the error output of another error, this makes calling `PetscMallocDump()` in the error handlers opt-in,
Sys: Introduce -on_error_malloc_dump and PETSC_ERR_MEM_LEAK
To avoid a malloc dump that swamps the error output of another error, this makes calling `PetscMallocDump()` in the error handlers opt-in, with a different flag (`-on_error_malloc_dump`) from the flag for calling `PetscMallocDump()` in `PetscFinalize()` (just `-malloc_dump`).
The addition of `PETSC_ERR_MEM_LEAK` allows for better error messages: `~PoolAllocator()` can detect a memory leak even if the system is not out of memory, so the error message will not say that for `PETSC_ERR_MEM_LEAK`.
show more ...
|