# HG changeset patch # User jlarmour # Date 1229665755 0 # Node ID 8a1c58fa439d508a490a9eed53b984c1ccc42f35 # Parent 7b7441a92f972d390cf65c2ffb842118b63c9341 * src/dlmalloc.cxx (MALLOC_COPY): Reinstate fix of 2008-01-06 (reverting change of 2008-11-03). * cdl/memalloc.cdl (CYGIMP_MEMALLOC_ALLOCATOR_DLMALLOC_USE_MEMCPY): Make explicit dependency on isoinfra functionality block which includes memmove(), and set default_value accordingly. diff --git a/packages/services/memalloc/common/current/ChangeLog b/packages/services/memalloc/common/current/ChangeLog --- a/packages/services/memalloc/common/current/ChangeLog +++ b/packages/services/memalloc/common/current/ChangeLog @@ -1,3 +1,11 @@ +2008-12-19 Jonathan Larmour + + * src/dlmalloc.cxx (MALLOC_COPY): Reinstate fix of 2008-01-06 + (reverting change of 2008-11-03). + * cdl/memalloc.cdl (CYGIMP_MEMALLOC_ALLOCATOR_DLMALLOC_USE_MEMCPY): + Make explicit dependency on isoinfra functionality block which + includes memmove(), and set default_value accordingly. + 2008-11-03 Nick Garnett * src/dlmalloc.cxx (MALLOC_COPY): Replace memmove() with memcpy(). diff --git a/packages/services/memalloc/common/current/cdl/memalloc.cdl b/packages/services/memalloc/common/current/cdl/memalloc.cdl --- a/packages/services/memalloc/common/current/cdl/memalloc.cdl +++ b/packages/services/memalloc/common/current/cdl/memalloc.cdl @@ -178,12 +178,15 @@ cdl_package CYGPKG_MEMALLOC { cdl_option CYGIMP_MEMALLOC_ALLOCATOR_DLMALLOC_USE_MEMCPY { display "Use system memmove() and memset()" requires CYGPKG_ISOINFRA - default_value { 0 != CYGPKG_ISOINFRA } + requires CYGINT_ISO_STRING_MEMFUNCS + default_value { (0 != CYGPKG_ISOINFRA) && (0 != CYGINT_ISO_STRING_MEMFUNCS) } description " This may be used to control whether memset() and memmove() are used within the implementation. The alternative is - to use some macro equivalents, which some people report - are faster in some circumstances." + to use some macro equivalents, which have been reported + to be faster in some circumstances. The use of \"MEMCPY\" + in the CDL option name is an anachronism and only + present for backwards compatibility." } cdl_option CYGNUM_MEMALLOC_ALLOCATOR_DLMALLOC_ALIGNMENT { diff --git a/packages/services/memalloc/common/current/src/dlmalloc.cxx b/packages/services/memalloc/common/current/src/dlmalloc.cxx --- a/packages/services/memalloc/common/current/src/dlmalloc.cxx +++ b/packages/services/memalloc/common/current/src/dlmalloc.cxx @@ -333,7 +333,7 @@ do { *mcdst++ = *mcsrc++; \ *mcdst++ = *mcsrc++; \ *mcdst = *mcsrc ; \ - } else memcpy(dest, src, mcsz); \ + } else memmove(dest, src, mcsz); \ } while(0) #else /* !CYGIMP_MEMALLOC_ALLOCATOR_DLMALLOC_USE_MEMCPY */