Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/catboost/catboost
/ y_allocate
Function
y_allocate
util/system/sys_alloc.h:8–16 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
6
#include <new>
7
8
inline void* y_allocate(size_t n) {
9
void* r = malloc(n);
10
11
if (r == nullptr) {
12
throw std::bad_alloc();
13
}
14
15
return r;
16
}
17
18
inline void y_deallocate(void* p) {
19
free(p);
Callers
4
Reserve
Method · 0.85
Resize
Method · 0.85
Allocate
Method · 0.85
Y_UNIT_TEST
Function · 0.85
Calls
2
malloc
Function · 0.50
bad_alloc
Class · 0.50
Tested by
no test coverage detected