pinentry-dmenu

a pinentry program based on dmenu
git clone anongit@rnpnr.xyz:pinentry-dmenu.git
Log | Files | Refs | Feed | README | LICENSE

memory.h (1545B)


      1 /* Quintuple Agent secure memory allocation
      2  * Copyright (C) 1998,1999 Free Software Foundation, Inc.
      3  * Copyright (C) 1999,2000 Robert Bihlmeyer <robbe@orcus.priv.at>
      4  *
      5  *  This program is free software; you can redistribute it and/or modify
      6  *  it under the terms of the GNU General Public License as published by
      7  *  the Free Software Foundation; either version 2 of the License, or
      8  *  (at your option) any later version.
      9  *
     10  *  This program is distributed in the hope that it will be useful,
     11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
     12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     13  *  GNU General Public License for more details.
     14  *
     15  *  You should have received a copy of the GNU General Public License
     16  *  along with this program; if not, write to the Free Software
     17  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
     18  */
     19 
     20 #ifndef _MEMORY_H
     21 #define _MEMORY_H
     22 
     23 #include <sys/types.h>
     24 
     25 #ifdef __cplusplus
     26 extern "C" {
     27 #if 0 
     28 }
     29 #endif
     30 #endif
     31 
     32 
     33 /* values for flags, hardcoded in secmem.c */
     34 #define SECMEM_WARN		0
     35 #define SECMEM_DONT_WARN	1
     36 #define SECMEM_SUSPEND_WARN	2
     37 
     38 void secmem_init( size_t npool );
     39 void secmem_term( void );
     40 void *secmem_malloc( size_t size );
     41 void *secmem_realloc( void *a, size_t newsize );
     42 void secmem_free( void *a );
     43 int  m_is_secure( const void *p );
     44 void secmem_dump_stats(void);
     45 void secmem_set_flags( unsigned flags );
     46 unsigned secmem_get_flags(void);
     47 size_t secmem_get_max_size (void);
     48 
     49 #if 0 
     50 {
     51 #endif
     52 #ifdef __cplusplus
     53 }
     54 #endif
     55 #endif /* _MEMORY_H */