PETSc version 3.17.0
Fix/Edit manual page

# PetscMallocSetCoalesce

Use coalesced malloc when allocating groups of objects

### Synopsis

    #include "petscsys.h"
    PetscErrorCode PetscMallocSetCoalesce(PetscBool coalesce)

Not Collective

### Input Parameters

| coalesce | - PETSC_TRUE to use coalesced malloc for multi-object allocation.

### Options Database Keys

| -malloc_coalesce | - turn coalesced malloc on or off

### Note

PETSc uses coalesced malloc by default for optimized builds and not for debugging builds. This default can be changed via the command-line option -malloc_coalesce or by calling this function. This function can only be called immediately after PetscInitialize()

### See Also

PetscMallocA()

### 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