WPILibC++  2020.3.2
MemAlloc.h File Reference
#include "wpi/Compiler.h"
#include "wpi/ErrorHandling.h"
#include <cstdlib>

Go to the source code of this file.

Namespaces

 wpi
 WPILib C++ utilities (wpiutil) namespace.
 

Functions

LLVM_ATTRIBUTE_RETURNS_NONNULL void * wpi::safe_malloc (size_t Sz)
 
LLVM_ATTRIBUTE_RETURNS_NONNULL void * wpi::safe_calloc (size_t Count, size_t Sz)
 
LLVM_ATTRIBUTE_RETURNS_NONNULL void * wpi::safe_realloc (void *Ptr, size_t Sz)
 

Detailed Description

This file defines counterparts of C library allocation functions defined in the namespace 'std'. The new allocation functions crash on allocation failure instead of returning null pointer.