51a3618e70640d87cd09046f6b6910b6db130a0e
[mono.git] / mono / utils / memfuncs.h
1 /*
2  * memfuncs.h: Our own bzero/memmove.
3  *
4  * Copyright (C) 2015 Xamarin Inc
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Library General Public
8  * License 2.0 as published by the Free Software Foundation;
9  *
10  * This library 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 GNU
13  * Library General Public License for more details.
14  *
15  * You should have received a copy of the GNU Library General Public
16  * License 2.0 along with this library; if not, write to the Free
17  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18  */
19
20 #ifndef __MONO_UTILS_MEMFUNCS_H__
21 #define __MONO_UTILS_MEMFUNCS_H__
22
23 #include <stdlib.h>
24
25 /*
26 These functions must be used when it's possible that either destination is not
27 word aligned or size is not a multiple of word size.
28 */
29 void mono_gc_bzero_atomic (void *dest, size_t size);
30 void mono_gc_bzero_aligned (void *dest, size_t size);
31 void mono_gc_memmove_atomic (void *dest, const void *src, size_t size);
32 void mono_gc_memmove_aligned (void *dest, const void *src, size_t size);
33
34 #endif