PetscMallocSetDRAM — PETSc 3.23.0 documentation

Skip to main content
`Ctrl`+`K`

# 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

Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages