(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:
Ulrich Drepper 2000-12-27 23:27:22 +00:00
parent de149cdbaf
commit 5fba3e5e3c
1 changed files with 5 additions and 0 deletions

View File

@ -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. */