16#ifndef WPIUTIL_WPI_MEMALLOC_H
17#define WPIUTIL_WPI_MEMALLOC_H
28#pragma warning(disable : 6387)
29#pragma warning(disable : 28196)
30#pragma warning(disable : 28183)
34 void *Result = std::malloc(Sz);
35 if (Result ==
nullptr) {
48 void *Result = std::calloc(Count, Sz);
49 if (Result ==
nullptr) {
53 if (Count == 0 || Sz == 0)
61 void *Result = std::realloc(Ptr, Sz);
62 if (Result ==
nullptr) {
#define LLVM_ATTRIBUTE_RETURNS_NOALIAS
\macro LLVM_ATTRIBUTE_RETURNS_NOALIAS Used to mark a function as returning a pointer that does not al...
Definition: Compiler.h:305
#define LLVM_ATTRIBUTE_RETURNS_NONNULL
Definition: Compiler.h:293
Definition: AprilTagFieldLayout.h:18
LLVM_ATTRIBUTE_RETURNS_NONNULL void * safe_malloc(size_t Sz)
Definition: MemAlloc.h:33
void deallocate_buffer(void *Ptr, size_t Size, size_t Alignment)
Deallocate a buffer of memory with the given size and alignment.
void report_bad_alloc_error(const char *Reason, bool GenCrashDiag=true)
Reports a bad alloc error, calling any user defined bad alloc error handler.
LLVM_ATTRIBUTE_RETURNS_NONNULL void * safe_realloc(void *Ptr, size_t Sz)
Definition: MemAlloc.h:60
LLVM_ATTRIBUTE_RETURNS_NONNULL void * safe_calloc(size_t Count, size_t Sz)
Definition: MemAlloc.h:46
LLVM_ATTRIBUTE_RETURNS_NONNULL LLVM_ATTRIBUTE_RETURNS_NOALIAS void * allocate_buffer(size_t Size, size_t Alignment)
Allocate a buffer of memory with the given size and alignment.