Commits

Matt Knepley committed afdbcbd Merge

Merge branch 'knepley/fix-hash-scaling' into knepley/pylith

* knepley/fix-hash-scaling:
DMLabel: Split Malloc3 into Malloc2 and Malloc

Comments (0)

Files changed (1)

src/dm/impls/plex/plexlabel.c

   (*labelnew)->numStrata  = label->numStrata;
   (*labelnew)->arrayValid = PETSC_TRUE;
   if (label->numStrata) {
-    ierr = PetscMalloc3(label->numStrata,PetscInt,&(*labelnew)->stratumValues,label->numStrata+1,PetscInt,&(*labelnew)->stratumOffsets,label->numStrata,PetscInt,&(*labelnew)->stratumSizes);CHKERRQ(ierr);
+    ierr = PetscMalloc(label->numStrata * sizeof(PetscInt), &(*labelnew)->stratumValues);CHKERRQ(ierr);
+    ierr = PetscMalloc2(label->numStrata,PetscInt,&(*labelnew)->stratumSizes,label->numStrata+1,PetscInt,&(*labelnew)->stratumOffsets);CHKERRQ(ierr);
     ierr = PetscMalloc(label->stratumOffsets[label->numStrata] * sizeof(PetscInt), &(*labelnew)->points);CHKERRQ(ierr);
     /* Could eliminate unused space here */
     for (v = 0; v < label->numStrata; ++v) {