aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/CMakeLists.txt
diff options
context:
space:
mode:
authorJay Berkenbilt <jberkenbilt@users.noreply.github.com>2022-08-31 21:50:17 +0200
committerGitHub <noreply@github.com>2022-08-31 21:50:17 +0200
commita078202c1b5823f1c13a4c559619158054029e73 (patch)
treefd47549657238cc532768dd19b1eb9fffb5b0269 /libqpdf/CMakeLists.txt
parent7b3134ef94db6ae1ca17c6d2dd4843322b7546c5 (diff)
parent4aac7c325acbf80ed4a6fc121c5a36f2d5515ff1 (diff)
downloadqpdf-a078202c1b5823f1c13a4c559619158054029e73.tar.zst
Merge pull request #752 from jberkenbilt/report-mem-usage
Report mem usage
Diffstat (limited to 'libqpdf/CMakeLists.txt')
-rw-r--r--libqpdf/CMakeLists.txt23
1 files changed, 23 insertions, 0 deletions
diff --git a/libqpdf/CMakeLists.txt b/libqpdf/CMakeLists.txt
index 46d35959..51f7476d 100644
--- a/libqpdf/CMakeLists.txt
+++ b/libqpdf/CMakeLists.txt
@@ -376,6 +376,29 @@ int main(int argc, char* argv[]) {
endif()
endfunction()
+check_c_source_compiles(
+"#include <malloc.h>
+#include <stdio.h>
+int main(int argc, char* argv[]) {
+ malloc_info(0, stdout);
+ return 0;
+}"
+ HAVE_MALLOC_INFO)
+
+check_c_source_compiles(
+"#include <stdio.h>
+#include <stdlib.h>
+int main(int argc, char* argv[]) {
+ char* buf;
+ size_t size;
+ FILE* f;
+ f = open_memstream(&buf, &size);
+ fclose(f);
+ free(buf);
+ return 0;
+}"
+ HAVE_OPEN_MEMSTREAM)
+
qpdf_check_ll_fmt("%lld" fmt_lld)
qpdf_check_ll_fmt("%I64d" fmt_i64d)
qpdf_check_ll_fmt("%I64lld" fmt_i64lld)