ITK Function Reference

(V10000.1.0.60_20160308.00)
Mem.h
Go to the documentation of this file.
1 // Copyright 2012 Siemens Product Lifecycle Management Software Inc. All Rights Reserved.
2 // ==================================================
3 // Copyright 2009.
4 // Siemens Product Lifecycle Management Software Inc.
5 // All Rights Reserved.
6 // ==================================================
7 // Copyright 2012 Siemens Product Lifecycle Management Software Inc. All Rights Reserved.
8 
14 #ifndef TEAMCENTER_BASE_UTILS_MEM_H
15 #define TEAMCENTER_BASE_UTILS_MEM_H
16 
17 #include <stdarg.h>
18 #include <base_utils/libbase_utils_exports.h>
19 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
40 extern BASE_UTILS_API void* MEM_alloc(
41  int n_bytes
42  );
43 
56 extern BASE_UTILS_API void* MEM_realloc(
57  void* ptr,
58  int n_bytes
59  );
60 
67 extern BASE_UTILS_API void* MEM_crealloc(
68  void* ptr,
69  int n_items,
70  int item_size
71  );
72 
78 extern BASE_UTILS_API void MEM_free(
79  void* ptr
80  );
81 
86 extern BASE_UTILS_API char* MEM_string_copy(
87  const char* str
88  );
89 
96 extern BASE_UTILS_API char* MEM_string_ncopy(
97  const char *str,
98  int n
99  );
100 
108 extern BASE_UTILS_API char* MEM_string_append(
109  char *str,
110  const char *appendage
111 );
112 
120 extern BASE_UTILS_API char* MEM_string_nappend(
121  char *str,
122  const char *appendage,
123  int n
124 );
125 
142 extern BASE_UTILS_API char* MEM_sprintf(
143  const char *format,
144  ...
145  );
146 
164 extern BASE_UTILS_API char* MEM_vsprintf(
165  const char *format,
166  va_list arg
167  );
168 
171 #ifdef __cplusplus
172 }
173 #endif
174 
175 #include <base_utils/libbase_utils_undef.h>
176 
177 #endif /* TEAMCENTER_BASE_UTILS_MEM_H */