:orphan: # PetscMallocSetDRAM Set `PetscMalloc()` to use DRAM. If memkind is available, change the memkind type. Otherwise, switch the current malloc and free routines to the `PetscMallocAlign()` and `PetscFreeAlign()` (PETSc default). ## Synopsis ``` #include "petscsys.h" PetscErrorCode PetscMallocSetDRAM(void) ``` Not Collective ## Note This provides a way to do the allocation on DRAM temporarily. One can switch back to the previous choice by calling `PetscMallocReset()`. ## See Also `PetscMallocReset()`, `PetscMalloc()`, `PetscFree()` ## Level developer ## Location src/sys/memory/mal.c --- [Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/sys/memory/mal.c) [Index of all Sys routines](index.md) [Table of Contents for all manual pages](/manualpages/index.md) [Index of all manual pages](/manualpages/singleindex.md)