syslog-ng source
nondumpable-allocator.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2018 Balabit
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17  *
18  * As an additional exemption you are allowed to compile & link against the
19  * OpenSSL libraries as published by the OpenSSL project. See the file
20  * COPYING for details.
21  *
22  */
23 
24 #ifndef NONDUMPABLE_ALLOCATOR_H_INCLUDED
25 #define NONDUMPABLE_ALLOCATOR_H_INCLUDED
26 
27 #include "compat/glib.h"
28 
29 #define PUBLIC __attribute__ ((visibility ("default")))
30 #define INTERNAL __attribute__ ((visibility ("hidden")))
31 
32 typedef void(*NonDumpableLogger)(gchar *summary, gchar *reason);
33 
34 gpointer nondumpable_buffer_alloc(gsize len) PUBLIC;
36 gpointer nondumpable_buffer_realloc(gpointer buffer, gsize len) PUBLIC;
37 gpointer nondumpable_memcpy(gpointer dest, gpointer src, gsize len) PUBLIC;
38 void nondumpable_mem_zero(gpointer s, gsize len) PUBLIC;
40 
41 #endif
void nondumpable_setlogger(NonDumpableLogger _debug, NonDumpableLogger _fatal) PUBLIC
Definition: nondumpable-allocator.c:50
gpointer nondumpable_buffer_realloc(gpointer buffer, gsize len) PUBLIC
Definition: nondumpable-allocator.c:166
gpointer nondumpable_buffer_alloc(gsize len) PUBLIC
Definition: nondumpable-allocator.c:133
void(* NonDumpableLogger)(gchar *summary, gchar *reason)
Definition: nondumpable-allocator.h:32
void nondumpable_mem_zero(gpointer s, gsize len) PUBLIC
Definition: nondumpable-allocator.c:149
gpointer nondumpable_memcpy(gpointer dest, gpointer src, gsize len) PUBLIC
Definition: nondumpable-allocator.c:183
#define PUBLIC
Definition: nondumpable-allocator.h:29
void nondumpable_buffer_free(gpointer buffer) PUBLIC
Definition: nondumpable-allocator.c:158
int PLUGIN_NAME_US _debug
GString * buffer
Definition: test_smart_multi_line.c:69