MCPcopy Create free account
hub / github.com/apache/cloudberry / get_hash_mem

Function get_hash_mem

src/backend/executor/nodeHash.c:4133–4145  ·  view source on GitHub ↗

* Convert the hash memory limit to an integer number of kilobytes, * that is something comparable to work_mem. Like work_mem, we clamp * the result to ensure that multiplying it by 1024 fits in a long int. * * This is deprecated since it may understate the actual memory limit. * It is unused in core and will eventually be removed. */

Source from the content-addressed store, hash-verified

4131 * It is unused in core and will eventually be removed.
4132 */
4133int
4134get_hash_mem(void)
4135{
4136 size_t mem_limit = get_hash_memory_limit();
4137
4138 /* Remove the kilobyte factor */
4139 mem_limit /= 1024;
4140
4141 /* Clamp to MAX_KILOBYTES, like work_mem */
4142 mem_limit = Min(mem_limit, (size_t) MAX_KILOBYTES);
4143
4144 return (int) mem_limit;
4145}
4146
4147/*
4148 * Convert AttrFilter to ScanKeyData and send these runtime filters to the

Callers 1

initial_cost_hashjoinFunction · 0.85

Calls 1

get_hash_memory_limitFunction · 0.85

Tested by

no test coverage detected