mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-19 16:20:50 +00:00
Add some comments
This commit is contained in:
parent
9ec1fd1ab7
commit
05c7dc582a
@ -41,6 +41,9 @@ T getJemallocValue(const char * name)
|
||||
return value;
|
||||
}
|
||||
|
||||
/// Each mallctl call consists of string name lookup which can be expensive.
|
||||
/// This can be avoided by translating name to "Management Information Base" (MIB)
|
||||
/// and using it in mallctlbymib calls
|
||||
template <typename T>
|
||||
struct JemallocMibCache
|
||||
{
|
||||
|
@ -8,6 +8,12 @@ namespace DB
|
||||
{
|
||||
|
||||
#if USE_JEMALLOC
|
||||
/// Correct MemoryTracker based on stats.resident read from jemalloc.
|
||||
/// This requires jemalloc built with --enable-stats which we use.
|
||||
/// The worker spawns a background thread which moves the jemalloc epoch (updates internal stats),
|
||||
/// and fetches the current stats.resident whose value is sent to global MemoryTracker.
|
||||
/// Additionally, if the current memory usage is higher than global hard limit,
|
||||
/// jemalloc's dirty pages are forcefully purged.
|
||||
class MemoryWorker
|
||||
{
|
||||
public:
|
||||
|
Loading…
Reference in New Issue
Block a user