Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 


Quellcode-Bibliothek 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;
}

95%


¤ 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.0.22Bemerkung:  (vorverarbeitet)  ¤

*Bot Zugriff






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

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 ist noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Produkte
     Quellcodebibliothek

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik

Monitoring

Montastic status badge