From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10322 invoked by alias); 19 Dec 2008 05:49:50 -0000 Received: (qmail 10314 invoked by uid 22791); 19 Dec 2008 05:49:49 -0000 X-SWARE-Spam-Status: No, hits=-1.0 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_24,J_CHICKENPOX_64,J_CHICKENPOX_74,J_CHICKENPOX_83,SPF_PASS X-Spam-Status: No, hits=-1.0 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_24,J_CHICKENPOX_64,J_CHICKENPOX_74,J_CHICKENPOX_83,SPF_PASS X-Spam-Check-By: sourceware.org Received: from hagrid.ecoscentric.com (HELO mail.ecoscentric.com) (212.13.207.197) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 19 Dec 2008 05:48:59 +0000 Received: from localhost (hagrid.ecoscentric.com [127.0.0.1]) by mail.ecoscentric.com (Postfix) with ESMTP id B9BF23B40040 for ; Fri, 19 Dec 2008 05:48:56 +0000 (GMT) X-Virus-Scanned: amavisd-new at ecoscentric.com Received: from mail.ecoscentric.com ([127.0.0.1]) by localhost (hagrid.ecoscentric.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id F2472FjkIJRw; Fri, 19 Dec 2008 05:48:54 +0000 (GMT) Message-ID: <494B35C5.2010003@eCosCentric.com> Date: Fri, 19 Dec 2008 05:49:00 -0000 From: Jonathan Larmour User-Agent: Thunderbird 1.5.0.12 (X11/20070530) MIME-Version: 1.0 To: eCos Patches List Subject: Reinstate memalloc use of memmove X-Enigmail-Version: 0.94.4.0 OpenPGP: id=A5FB74E6 Content-Type: multipart/mixed; boundary="------------040107000600060403010803" X-Virus-Checked: Checked by ClamAV on sourceware.org Mailing-List: contact ecos-patches-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: ecos-patches-owner@ecos.sourceware.org X-SW-Source: 2008-12/txt/msg00039.txt.bz2 This is a multi-part message in MIME format. --------------040107000600060403010803 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-length: 399 The previous change was buried in the Cortex-M3 contrib, but memmove() was correct. I've made the CDL better instead. Jifl -- eCosCentric Limited http://www.eCosCentric.com/ The eCos experts Barnwell House, Barnwell Drive, Cambridge, UK. Tel: +44 1223 245571 Registered in England and Wales: Reg No 4422071. ------["Si fractum non sit, noli id reficere"]------ Opinions==mine --------------040107000600060403010803 Content-Type: text/x-patch; name="dlmalloc.memmove.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="dlmalloc.memmove.patch" Content-length: 3578 Index: ChangeLog =================================================================== RCS file: /cvs/ecos/ecos/packages/services/memalloc/common/current/ChangeLog,v retrieving revision 1.44 diff -u -5 -p -r1.44 ChangeLog --- ChangeLog 3 Nov 2008 14:53:52 -0000 1.44 +++ ChangeLog 19 Dec 2008 05:47:14 -0000 @@ -1,5 +1,13 @@ +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(). * include/dlmallocimpl.hxx (class Cyg_Mempool_dlmalloc_Implementation): Index: cdl/memalloc.cdl =================================================================== RCS file: /cvs/ecos/ecos/packages/services/memalloc/common/current/cdl/memalloc.cdl,v retrieving revision 1.17 diff -u -5 -p -r1.17 memalloc.cdl --- cdl/memalloc.cdl 6 Jan 2008 12:17:41 -0000 1.17 +++ cdl/memalloc.cdl 19 Dec 2008 05:47:14 -0000 @@ -176,16 +176,19 @@ 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 { display "Minimum alignment of allocated blocks" flavor data Index: src/dlmalloc.cxx =================================================================== RCS file: /cvs/ecos/ecos/packages/services/memalloc/common/current/src/dlmalloc.cxx,v retrieving revision 1.12 diff -u -5 -p -r1.12 dlmalloc.cxx --- src/dlmalloc.cxx 3 Nov 2008 14:53:52 -0000 1.12 +++ src/dlmalloc.cxx 19 Dec 2008 05:47:14 -0000 @@ -331,11 +331,11 @@ do { if(mcsz >= 9*sizeof(mcsz)) { *mcdst++ = *mcsrc++; \ *mcdst++ = *mcsrc++; }}} \ *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 */ /* Use Duff's device for good zeroing/copying performance. */ --------------040107000600060403010803--