* Reinstate memalloc use of memmove
@ 2008-12-19 5:49 Jonathan Larmour
0 siblings, 0 replies; only message in thread
From: Jonathan Larmour @ 2008-12-19 5:49 UTC (permalink / raw)
To: eCos Patches List
[-- Attachment #1: Type: text/plain, Size: 399 bytes --]
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
[-- Attachment #2: dlmalloc.memmove.patch --]
[-- Type: text/x-patch, Size: 3578 bytes --]
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 <jifl@eCosCentric.com>
+
+ * 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 <nickg@ecoscentric.com>
* 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. */
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-12-19 5:49 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-19 5:49 Reinstate memalloc use of memmove Jonathan Larmour
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).