From 0a54247652e49ce384dcf0d8df078201aa106089 Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Wed, 31 Aug 2022 12:49:29 -0400 Subject: Add QUtil::get_max_memory_usage for testing --- libqpdf/CMakeLists.txt | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'libqpdf/CMakeLists.txt') diff --git a/libqpdf/CMakeLists.txt b/libqpdf/CMakeLists.txt index cf807f6d..106292a3 100644 --- a/libqpdf/CMakeLists.txt +++ b/libqpdf/CMakeLists.txt @@ -375,6 +375,29 @@ int main(int argc, char* argv[]) { endif() endfunction() +check_c_source_compiles( +"#include +#include +int main(int argc, char* argv[]) { + malloc_info(0, stdout); + return 0; +}" + HAVE_MALLOC_INFO) + +check_c_source_compiles( +"#include +#include +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) -- cgit v1.2.3-54-g00ecf