mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-24 02:03:35 +08:00
(memmove): Add prototypes. (MALLOC_MEMMOVE): Define. (chunk_realloc): Use it instead of MALLOC_COPY if source and destination might overlap.
This commit is contained in:
parent
de149cdbaf
commit
5fba3e5e3c
@ -415,9 +415,11 @@ extern "C" {
|
||||
#if __STD_C
|
||||
void* memset(void*, int, size_t);
|
||||
void* memcpy(void*, const void*, size_t);
|
||||
void* memmove(void*, const void*, size_t);
|
||||
#else
|
||||
Void_t* memset();
|
||||
Void_t* memcpy();
|
||||
Void_t* memmove();
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@ -462,6 +464,9 @@ do { \
|
||||
} else memcpy(dest, src, mcsz); \
|
||||
} while(0)
|
||||
|
||||
#define MALLOC_MEMMOVE(dest,src,nbytes) \
|
||||
memmove(dest, src, mcsz)
|
||||
|
||||
#else /* !USE_MEMCPY */
|
||||
|
||||
/* Use Duff's device for good zeroing/copying performance. */
|
||||
|
Loading…
Reference in New Issue
Block a user