MCPcopy Create free account
hub / github.com/AMReX-Codes/amrex / alloc

Method alloc

Src/Base/AMReX_BArena.cpp:3–14  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1#include <AMReX_BArena.H>
2
3void*
4amrex::BArena::alloc (std::size_t sz_)
5{
6 sz_ = Arena::align(sz_);
7#ifndef _WIN32
8 void* pt = std::aligned_alloc(align_size, sz_);
9#else
10 void* pt = _aligned_malloc(sz_, align_size);
11#endif
12 m_profiler.profile_alloc(pt, sz_);
13 return pt;
14}
15
16void
17amrex::BArena::free (void* pt)

Callers

nothing calls this directly

Calls 1

profile_allocMethod · 0.80

Tested by

no test coverage detected