mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-25 17:12:03 +00:00
Add missing file
This commit is contained in:
parent
2df3e14559
commit
0f832fcf8b
29
src/Common/clickhouse_malloc.cpp
Normal file
29
src/Common/clickhouse_malloc.cpp
Normal file
@ -0,0 +1,29 @@
|
||||
#if 0
|
||||
|
||||
#include <Common/memory.h>
|
||||
#include <iostream>
|
||||
|
||||
|
||||
extern "C" void * clickhouse_malloc(size_t size)
|
||||
{
|
||||
void * res = malloc(size);
|
||||
if (res)
|
||||
Memory::trackMemory(size);
|
||||
return res;
|
||||
}
|
||||
|
||||
extern "C" void clickhouse_free(void * ptr)
|
||||
{
|
||||
Memory::untrackMemory(ptr);
|
||||
free(ptr);
|
||||
}
|
||||
|
||||
extern "C" int clickhouse_posix_memalign(void ** memptr, size_t alignment, size_t size)
|
||||
{
|
||||
int res = posix_memalign(memptr, alignment, size);
|
||||
if (res == 0)
|
||||
Memory::trackMemory(size);
|
||||
return res;
|
||||
}
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user