diff options
author | monty@donna.mysql.com <> | 2001-02-17 14:19:19 +0200 |
---|---|---|
committer | monty@donna.mysql.com <> | 2001-02-17 14:19:19 +0200 |
commit | c533308a158795f91247e9fe3c7304fa5e7d2b3c (patch) | |
tree | bfe39951a73e906579ab819bf5198ad8f3a64a36 /innobase/include/ut0mem.h | |
parent | 024e2f39c9a3812243778ebe64b43e8edd22a4a1 (diff) | |
download | mariadb-git-c533308a158795f91247e9fe3c7304fa5e7d2b3c.tar.gz |
Added Innobase to source distribution
Diffstat (limited to 'innobase/include/ut0mem.h')
-rw-r--r-- | innobase/include/ut0mem.h | 64 |
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 + |