ProvSQL C/C++ API
Adding support for provenance and uncertainty management to PostgreSQL databases
Loading...
Searching...
No Matches
process_memory.h File Reference

Resident memory of a process, or of a process group. More...

#include <cstddef>
#include <sys/types.h>
Include dependency graph for process_memory.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

std::size_t provsql_process_rss (pid_t pid)
 The resident memory of process pid, in bytes, or 0 where the platform does not say.
std::size_t provsql_process_group_rss (pid_t pgid)
 The resident memory of the processes of group pgid, in bytes, or 0 where the platform does not say.

Detailed Description

Resident memory of a process, or of a process group.

Used by provsql.max_memory (the backend's own memory, see provsql_interrupt.h) and provsql.tool_max_memory (an external tool and the processes it forks, see external_tool.cpp). Read from the operating system on Linux, macOS and FreeBSD; elsewhere the functions return 0, and the budgets they serve have no effect.

Definition in file process_memory.h.

Function Documentation

◆ provsql_process_group_rss()

std::size_t provsql_process_group_rss ( pid_t pgid)

The resident memory of the processes of group pgid, in bytes, or 0 where the platform does not say.

Definition at line 75 of file process_memory.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ provsql_process_rss()

std::size_t provsql_process_rss ( pid_t pid)

The resident memory of process pid, in bytes, or 0 where the platform does not say.

Definition at line 47 of file process_memory.cpp.

Here is the caller graph for this function: