Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/GAP/pkg/digraphs/src/   (GAP Algebra Version 4.15.1©)  Datei vom 27.8.2025 mit Größe 874 B image not shown  

Quelle  safemalloc.c

  Sprache: C
 

/********************************************************************************
**
*A  safemalloc.c              Safer memory allocation
**
**
**  Copyright (C) 2024 - Daniel Pointon, J. D. Mitchell
**
**  This file is free software, see the digraphs/LICENSE.
**
********************************************************************************/


#include "safemalloc.h"

#include <stdlib.h>  // for malloc

#include "gap-includes.h"

void* safe_malloc(size_t size) {
  void* allocation = malloc(size);
  if (allocation == NULL) {
    ErrorQuit("Call to malloc(%d) failed, giving up!", (Int) size, 0L);
  }
  return allocation;
}

void* safe_calloc(size_t nitems, size_t size) {
  void* allocation = calloc(nitems, size);
  if (allocation == NULL) {
    ErrorQuit(
        "Call to calloc(%d, %d) failed, giving up!", (Int) nitems, (Int) size);
  }

  return allocation;
}

Messung V0.5 in Prozent
C=95 H=93 G=93

¤ Dauer der Verarbeitung: 0.12 Sekunden  (vorverarbeitet am  2026-06-17) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.