MCPcopy Create free account
hub / github.com/async-profiler/async-profiler / create

Method create

src/codeCache.cpp:16–21  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14
15
16char* NativeFunc::create(const char* name, short lib_index) {
17 NativeFunc* f = (NativeFunc*)malloc(sizeof(NativeFunc) + 1 + strlen(name));
18 f->_lib_index = lib_index;
19 f->_mark = 0;
20 return strcpy(f->_name, name);
21}
22
23void NativeFunc::destroy(char* name) {
24 free(from(name));

Callers 2

ServerMethod · 0.80
startMethod · 0.80

Calls 1

mallocFunction · 0.85

Tested by

no test coverage detected