[petsc-dev] Using multiple mallocs with PETSc

Lisandro Dalcin dalcinl at gmail.com
Fri Mar 10 09:58:20 CST 2017


On 10 March 2017 at 03:19, Barry Smith <bsmith at mcs.anl.gov> wrote:

>     PetscMallocRegister(malloc,realloc,free,&basicmalloc);
>     PetscMallocRegister(PetscMallocDebug,PetscReallocDebug,
> PetscFreeDebug,&debugmalloc);
>     PetscMallocRegister(PetscMallocHBW,PetscReallocHBW,PetscFreeHBW,&
> hbwmalloc);
>

I'm wondering whether we should also handle calloc() here, and implement
PetscCalloc properly. As I understand it, calloc != malloc+memset, and the
differences might be important in multicore+multithreading scenarios and
the first-touch policy.


-- 
Lisandro Dalcin
============
Research Scientist
Computer, Electrical and Mathematical Sciences & Engineering (CEMSE)
Extreme Computing Research Center (ECRC)
King Abdullah University of Science and Technology (KAUST)
http://ecrc.kaust.edu.sa/

4700 King Abdullah University of Science and Technology
al-Khawarizmi Bldg (Bldg 1), Office # 0109
Thuwal 23955-6900, Kingdom of Saudi Arabia
http://www.kaust.edu.sa

Office Phone: +966 12 808-0459
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20170310/1b90a642/attachment.html>


More information about the petsc-dev mailing list