summaryrefslogtreecommitdiff
path: root/innobase/include/ut0mem.h
diff options
context:
space:
mode:
authorunknown <jcole@tetra.spaceapes.com>2001-02-18 14:42:10 -0600
committerunknown <jcole@tetra.spaceapes.com>2001-02-18 14:42:10 -0600
commit881179334366d2f042de9ae9ab0d7a67d5775ba9 (patch)
tree7d0824870e87e0a863e77441476f9496216eb9f6 /innobase/include/ut0mem.h
parent09e5cbcca3a2f6400e52ab95a93b40b5c42d2153 (diff)
parentdc7eafea57a321c92716b5b84c574a0347ade74f (diff)
downloadmariadb-git-881179334366d2f042de9ae9ab0d7a67d5775ba9.tar.gz
Merge work.mysql.com:/home/bk/mysql
into tetra.spaceapes.com:/usr/home/jcole/bk/mysql
Diffstat (limited to 'innobase/include/ut0mem.h')
-rw-r--r--innobase/include/ut0mem.h64
1 files changed, 64 insertions, 0 deletions
diff --git a/innobase/include/ut0mem.h b/innobase/include/ut0mem.h
new file mode 100644
index 00000000000..4d266f34c17
--- /dev/null
+++ b/innobase/include/ut0mem.h
@@ -0,0 +1,64 @@
+/***********************************************************************
+Memory primitives
+
+(c) 1994, 1995 Innobase Oy
+
+Created 5/30/1994 Heikki Tuuri
+************************************************************************/
+
+#ifndef ut0mem_h
+#define ut0mem_h
+
+#include <string.h>
+#include <stdlib.h>
+#include "univ.i"
+
+UNIV_INLINE
+void*
+ut_memcpy(void* dest, void* sour, ulint n);
+
+UNIV_INLINE
+void*
+ut_memmove(void* dest, void* sour, ulint n);
+
+UNIV_INLINE
+int
+ut_memcmp(void* str1, void* str2, ulint n);
+
+
+void*
+ut_malloc(ulint n);
+
+UNIV_INLINE
+void
+ut_free(void* ptr);
+
+UNIV_INLINE
+char*
+ut_strcpy(char* dest, char* sour);
+
+UNIV_INLINE
+ulint
+ut_strlen(char* str);
+
+UNIV_INLINE
+int
+ut_strcmp(void* str1, void* str2);
+
+/**************************************************************************
+Catenates two strings into newly allocated memory. The memory must be freed
+using mem_free. */
+
+char*
+ut_str_catenate(
+/*============*/
+ /* out, own: catenated null-terminated string */
+ char* str1, /* in: null-terminated string */
+ char* str2); /* in: null-terminated string */
+
+#ifndef UNIV_NONINL
+#include "ut0mem.ic"
+#endif
+
+#endif
+