MCPcopy Create free account
hub / github.com/ablab/spades / getClearedMemory

Function getClearedMemory

ext/src/llvm/APInt.cpp:37–41  ·  view source on GitHub ↗

A utility function for allocating memory, checking for allocation failures, and ensuring the contents are zeroed.

Source from the content-addressed store, hash-verified

35/// A utility function for allocating memory, checking for allocation failures,
36/// and ensuring the contents are zeroed.
37inline static uint64_t* getClearedMemory(unsigned numWords) {
38 uint64_t *result = new uint64_t[numWords];
39 memset(result, 0, numWords * sizeof(uint64_t));
40 return result;
41}
42
43/// A utility function for allocating memory and checking for allocation
44/// failure. The content is not zeroed.

Callers 3

initSlowCaseMethod · 0.85
initFromArrayMethod · 0.85
fromStringMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected