PolarSSL v1.3.8
memory_buffer_alloc.h
Go to the documentation of this file.
1 
27 #ifndef POLARSSL_MEMORY_BUFFER_ALLOC_H
28 #define POLARSSL_MEMORY_BUFFER_ALLOC_H
29 
30 #if !defined(POLARSSL_CONFIG_FILE)
31 #include "config.h"
32 #else
33 #include POLARSSL_CONFIG_FILE
34 #endif
35 
36 #include <stdlib.h>
37 
46 #if !defined(POLARSSL_MEMORY_ALIGN_MULTIPLE)
47 #define POLARSSL_MEMORY_ALIGN_MULTIPLE 4
48 #endif
49 
50 /* \} name SECTION: Module settings */
51 
52 #define MEMORY_VERIFY_NONE 0
53 #define MEMORY_VERIFY_ALLOC (1 << 0)
54 #define MEMORY_VERIFY_FREE (1 << 1)
55 #define MEMORY_VERIFY_ALWAYS (MEMORY_VERIFY_ALLOC | MEMORY_VERIFY_FREE)
56 
57 #ifdef __cplusplus
58 extern "C" {
59 #endif
60 
78 int memory_buffer_alloc_init( unsigned char *buf, size_t len );
79 
83 void memory_buffer_alloc_free( void );
84 
93 void memory_buffer_set_verify( int verify );
94 
95 #if defined(POLARSSL_MEMORY_DEBUG)
96 
102 void memory_buffer_alloc_status( void );
103 #endif /* POLARSSL_MEMORY_DEBUG */
104 
116 int memory_buffer_alloc_verify( void );
117 
118 #ifdef __cplusplus
119 }
120 #endif
121 
122 #endif /* memory_buffer_alloc.h */