* 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. */
| 4131 | * It is unused in core and will eventually be removed. |
| 4132 | */ |
| 4133 | int |
| 4134 | get_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 |
no test coverage detected