aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/qpdf/QPDFJob.hh1
-rw-r--r--include/qpdf/QUtil.hh12
-rw-r--r--include/qpdf/auto_job_c_main.hh1
3 files changed, 13 insertions, 1 deletions
diff --git a/include/qpdf/QPDFJob.hh b/include/qpdf/QPDFJob.hh
index 0e4d8a2e..2d4ab0d2 100644
--- a/include/qpdf/QPDFJob.hh
+++ b/include/qpdf/QPDFJob.hh
@@ -711,6 +711,7 @@ class QPDFJob
bool json_input;
bool json_output;
std::string update_from_json;
+ bool report_mem_usage;
};
std::shared_ptr<Members> m;
};
diff --git a/include/qpdf/QUtil.hh b/include/qpdf/QUtil.hh
index 41b89da4..96f4f7ed 100644
--- a/include/qpdf/QUtil.hh
+++ b/include/qpdf/QUtil.hh
@@ -525,7 +525,17 @@ namespace QUtil
wchar_t const* const argv[],
std::function<int(int, char const* const[])> realmain);
#endif // QPDF_NO_WCHAR_T
-}; // namespace QUtil
+
+ // Try to return the maximum amount of memory allocated by the
+ // current process and its threads. Return 0 if unable to
+ // determine. This is Linux-specific and not implemented to be
+ // completely reliable. It is used during development for
+ // performance testing to detect changes that may significantly
+ // change memory usage. It is not recommended for use for other
+ // purposes.
+ QPDF_DLL
+ size_t get_max_memory_usage();
+}; // namespace QUtil
inline bool
QUtil::is_hex_digit(char ch)
diff --git a/include/qpdf/auto_job_c_main.hh b/include/qpdf/auto_job_c_main.hh
index 90927ded..cc655c23 100644
--- a/include/qpdf/auto_job_c_main.hh
+++ b/include/qpdf/auto_job_c_main.hh
@@ -33,6 +33,7 @@ QPDF_DLL Config* qdf();
QPDF_DLL Config* rawStreamData();
QPDF_DLL Config* recompressFlate();
QPDF_DLL Config* removePageLabels();
+QPDF_DLL Config* reportMemUsage();
QPDF_DLL Config* requiresPassword();
QPDF_DLL Config* showEncryption();
QPDF_DLL Config* showEncryptionKey();