summaryrefslogtreecommitdiffstats
path: root/main/pinentry-tqt/secmem/memory.h
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2025-05-25 14:15:29 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2025-09-25 12:14:56 +0900
commite09aff21f81165479e531aa78670447680b70559 (patch)
tree68e431a89aeedc74060808012a392ee002f95bce /main/pinentry-tqt/secmem/memory.h
parent5e806f0b9db5f5681705e1e2ce2ead7f06ae581f (diff)
downloadextra-dependencies-feat/restructuring.tar.gz
extra-dependencies-feat/restructuring.zip
Restructuring: pinentry-tqtfeat/restructuring
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'main/pinentry-tqt/secmem/memory.h')
-rw-r--r--main/pinentry-tqt/secmem/memory.h55
1 files changed, 55 insertions, 0 deletions
diff --git a/main/pinentry-tqt/secmem/memory.h b/main/pinentry-tqt/secmem/memory.h
new file mode 100644
index 00000000..75fe708b
--- /dev/null
+++ b/main/pinentry-tqt/secmem/memory.h
@@ -0,0 +1,55 @@
+/* Quintuple Agent secure memory allocation
+ * Copyright (C) 1998,1999 Free Software Foundation, Inc.
+ * Copyright (C) 1999,2000 Robert Bihlmeyer <robbe@orcus.priv.at>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see <https://www.gnu.org/licenses/>.
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#ifndef _MEMORY_H
+#define _MEMORY_H
+
+#include <sys/types.h>
+
+#ifdef __cplusplus
+extern "C" {
+#if 0
+}
+#endif
+#endif
+
+
+/* values for flags, hardcoded in secmem.c */
+#define SECMEM_WARN 0
+#define SECMEM_DONT_WARN 1
+#define SECMEM_SUSPEND_WARN 2
+
+void secmem_init( size_t npool );
+void secmem_term( void );
+void *secmem_malloc( size_t size );
+void *secmem_realloc( void *a, size_t newsize );
+void secmem_free( void *a );
+int m_is_secure( const void *p );
+void secmem_dump_stats(void);
+void secmem_set_flags( unsigned flags );
+unsigned secmem_get_flags(void);
+size_t secmem_get_max_size (void);
+
+#if 0
+{
+#endif
+#ifdef __cplusplus
+}
+#endif
+#endif /* _MEMORY_H */