ATLAS Offline Software
Loading...
Searching...
No Matches
xmalloc.cxx
Go to the documentation of this file.
1/*
2 * Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration.
3 */
10
11
12#include "CxxUtils/xmalloc.h"
13#include <malloc.h>
14#include <new>
15
16
17
18namespace CxxUtils {
19
20
31void* xmalloc (size_t size)
32{
33 void* p = malloc (size);
34 if (!p) throw std::bad_alloc();
35 return p;
36}
37
38
39
40} // namespace CxxUtils
41
42
void * xmalloc(size_t size)
Trapping version of malloc.
Definition xmalloc.cxx:31
Trapping version of malloc.