1 2008-01-06 Andrew Lunn <andrew.lunn@ascom.ch>
3 * src/dlmalloc.cxx (MALLOC_COPY):
4 * cdl/memalloc.cdl: Use memmove instead of memcpy which can go
5 wrong in realloc() when the new and old block overlaps.
6 CYGIMP_MEMALLOC_ALLOCATOR_DLMALLOC_USE_MEMCPY has been retained
7 instead of being renamed to ..._MEMMOVE to help backward
8 compatibility with older configurations. Thanks to Oyvind Harboe
11 2007-11-05 Oyvind Harboe <oyvind.harboe@zylin.com>
13 * cdl/memalloc.cdl: Added option CYGBLD_MEMALLOC_MALLOC_EXTERNAL_JOIN_H
14 to let applications implement a way to pick the pool to allocate memory
15 from based on an application specific heuristic.
16 * src/malloc.cxx: Use it.
18 2007-10-24 Oyvind Harboe <oyvind.harboe@zylin.com>
19 2007-10-24 Jonathan Larmour <jifl@eCosCentric.com>
21 * src/malloc.cxx: Init priority for pool initialization is now
22 CYG_INIT_MEMALLOC instead of before CYG_INIT_LIBC
23 * src/heapgen.tcl: Ditto.
25 2006-05-17 Andrew Lunn <andrew.lunn@ascom.ch>
27 * doc/memalloc.sgml: Fix parameters for calloc. Reported by
30 2005-09-30 Alexander Neundorf <neundorf@kde.org>
32 * doc/memalloc.sgml: two minor fixes
34 2005-07-30 Andrew Lunn <andrew.lunn@ascom.ch>
36 * tests/heaptest.c (test_pat): Casts to prevent compiler warnings.
37 * tests/testaux.hxx: new cannot be both global and static.
39 2005-07-22 Andrew Lunn <andrew.lunn@ascom.ch>
41 * cdl/memalloc.cdl: Use the CXXFLAGS for the native compiler to
42 avoid passing it flags only valid for C.
44 2005-03-27 Andrew Lunn <andrew.lunn@ascom.ch>
46 * cdl/memalloc.cdl: Added reference to documentation
47 * doc/memalloc.sgml: Basic user documentation.
48 * tests/heaptest.c (test_pat): Fix compiler error with
51 2004-10-04 Oyvind Harboe <oyvind.harboe@zylin.com>
53 * src/dlmalloc.cxx (resize_alloc): No longer invoke
54 cyg_memalloc_alloc_fail() on failure to resize. It is not an out
55 of memory condition, it just means the current memory allocation
56 could not be expanded. realloc() will try allocating a completely
57 new block of memory and only if that fails do we have an out of
60 2004-10-01 Oyvind Harboe <oyvind.harboe@zylin.com>
62 * heapgen.tcl: place the CYGBLD_ATTRIB_INIT_PRI such that it
63 compiles for gcc 3.4.2 which is more picky about its placement.
65 2004-06-24 Oyvind Harboe <oyvind.harboe@zylin.com>
67 * Added cyg_memalloc_alloc_fail() fn which is invoked before
68 return NULL from failed allocations. Useful breakpoint site.
69 Andrew Lunn wrote some of the code and pointed out various
70 wrinkles to be ironed out.
72 2004-02-15 Jonathan Larmour <jifl@eCosCentric.com>
74 * include/kapi.h: Add throw specifications throughout.
75 * src/kapi.cxx: Ditto.
77 2003-10-06 Andrew Lunn <andrew.lunn@ascom.ch>
79 * src/dlmalloc.cxx (Cyg_Mempool_dlmalloc_Implementation): Fixed
80 compiler warning added by previous patch.
82 2003-09-30 Eric Doenges <Eric.Doengea@DynaPel.com>
84 * cdl/memalloc.cdl, src/dlmalloc.cxx: Make the minimum memory
85 alignment a configuration option for Doug Lea's memory allocator.
87 2003-02-05 Jonathan Larmour <jifl@eCosCentric.com>
89 * include/memjoin.inl: Don't use default arg in definition.
91 2003-02-04 John Dallaway <jld@ecoscentric.com>
93 * src/heapgen.tcl: Accommodate POSIX-style arguments
96 2003-01-29 John Dallaway <jld@ecoscentric.com>
98 * src/heapgen.tcl: Accommodate latest Cygwin Tcl shell
101 2002-05-10 Jonathan Larmour <jlarmour@redhat.com>
103 * tests/heaptest.c (test_pat): Make failure messages clearer.
104 (cyg_start): Output what failures mean.
106 2002-04-24 Yoshinori Sato <qzb04471@nifty.ne.jp>
108 * src/memfixed.cxx (resize_alloc): Don't set default args in func
111 2002-01-30 Bart Veer <bartv@redhat.com>
114 Never call realloc() with a new size of 0, which frees the buffer.
115 Fix the volatility of ptr.p
117 2002-01-23 Jesper Skov <jskov@redhat.com>
119 * tests/malloc4.cxx (myrand): Fix overflow.
121 2002-01-15 Jonathan Larmour <jlarmour@redhat.com>
123 * tests/malloc4.cxx (myrand): Fix so that it really treats the limit
126 2001-10-17 Jesper Skov <jskov@redhat.com>
128 * include/sepmetaimpl.inl: CYGINT_ISO_STRING_MEMFUNCS checks
131 2001-10-11 Jesper Skov <jskov@redhat.com>
133 * tests/testaux.hxx (new_thread): Fixed allocation: increase
134 counter before starting threads which have been allocated
137 2001-10-08 Jonathan Larmour <jlarmour@redhat.com>
139 * cdl/memalloc.cdl: Only build malloc.cxx and kapi.cxx when needed.
141 2001-09-20 Jesper Skov <jskov@redhat.com>
143 * tests/heaptest.c: Fix failure reporting.
145 2001-09-07 Jesper Skov <jskov@redhat.com>
147 * tests/heaptest.c: Added some extra output on failures.
149 2001-08-01 Jonathan Larmour <jlarmour@redhat.com>
151 * include/sepmetaimpl.inl: Define check_free_memdq and
152 check_alloced_memdq as inlines.
154 * cdl/memalloc.cdl: Add new allocator supporting separate metadata,
155 and the associated config options, and build sepmeta.cxx and tests.
156 Build heapgeninc.tcl with macros that work with both gcc2 and gcc3.
158 Add CYGBLD_MEMALLOC_MALLOC_EXTERNAL_HEAP_H to allow external entities
160 * src/malloc.cxx: Include CYGBLD_MEMALLOC_MALLOC_EXTERNAL_HEAP_H if
161 defined instead of default heap definition.
162 * include/sepmeta.hxx, include/sepmetaimpl.hxx, include/sepmetaimpl.inl,
163 src/sepmeta.cxx, tests/sepmeta1.cxx, tests/sepmeta2.cxx:
164 New files for seperated metadata allocator.
166 2001-07-18 Jonathan Larmour <jlarmour@redhat.com>
168 * src/heapgen.tcl: Use constructor priority of CYG_INIT_MEMALLOC
169 for heap objects in generated heaps.cxx.
171 2001-07-12 Jonathan Larmour <jlarmour@redhat.com>
173 * tests/malloc1.c (main): Accoutn for allocators that do allocate
174 space for allocs of 0.
175 Test that allocating all space works.
176 * src/dlmalloc.cxx (get_status): Correct again calculation of maxfree
178 2001-06-28 Jonathan Larmour <jlarmour@redhat.com>
180 * include/memjoin.inl (~Cyg_Mempool_Joined): free even when asserts
183 * include/memvar.hxx (class Cyg_Mempool_Variable): Comment out argument
184 names for consistency.
185 * include/memfixed.hxx (class Cyg_Mempool_Fixed): Ditto.
186 * include/memjoin.hxx (class Cyg_Mempool_Joined): Ditto.
188 2001-06-20 Jonathan Larmour <jlarmour@redhat.com>
190 * include/mvarimpl.inl (get_status): Correct calculation of maxfree
191 by taking into account metadata.
193 2001-06-18 Jonathan Larmour <jlarmour@redhat.com>
195 * cdl/memalloc.cdl: Add heaptest test.
197 * tests/heaptest.c: New test to do a memory check of all of heap.
199 * src/dlmalloc.cxx (get_status): Correct maxfree and totalfree
200 by accounting for block headers.
202 * tests/realloc.c (cyg_start): Remove warning from declaration.
203 * tests/malloc1.c (cyg_start): Ditto.
204 * tests/malloc2.c (cyg_start): Ditto.
205 * tests/malloc3.c (cyg_start): Ditto.
206 * tests/malloc4.cxx (cyg_start): Ditto. Also add DEBUGTEST define
209 * tests/testaux.hxx (STACKSIZE): Double.
211 2001-05-02 Hugo Tyson <hmt@redhat.com>
213 * src/dlmalloc.cxx (Cyg_Mempool_dlmalloc_Implementation): Fix
214 previous change; "top" is a pseudo variable via a NULL pointer if
215 the heap is not initialized, so you can't use it as a flag for "no
216 mem here"; and a typo, the comparison was reversed. The two hid
217 each other, so the check for "no mem here" usually said "OK".
219 2001-05-01 Jonathan Larmour <jlarmour@redhat.com>
221 * include/mvarimpl.inl (try_alloc): Allow zero sized heaps.
222 (Cyg_Mempool_Variable_Implementation): Ditto.
223 * src/dlmalloc.cxx (try_alloc): Ditto.
224 (Cyg_Mempool_dlmalloc_Implementation): Ditto.
226 2001-04-12 Hugo Tyson <hmt@redhat.com>
228 * include/memjoin.inl (resize_alloc): Fix typo so it compiles.
229 This only applies if you configure multiple heaps.
231 2001-03-21 Jonathan Larmour <jlarmour@redhat.com>
233 * cdl/memalloc.cdl: Specify explicit output file when preprocessing
234 heapgen.cpp. Improves portability.
236 2001-02-01 Jonathan Larmour <jlarmour@redhat.com>
238 * tests/malloc4.cxx: Use semaphores to sync startup order.
240 2000-11-28 Jonathan Larmour <jlarmour@redhat.com>
242 * src/heapgen.tcl: Don't use cygpath -s for now as not all cygwins
245 2000-11-25 Jonathan Larmour <jlarmour@redhat.com>
247 * cdl/memalloc.cdl: Make sure PWD variable doesn't clash with bash PWD
250 2000-11-24 Jonathan Larmour <jlarmour@redhat.com>
252 * cdl/memalloc.cdl: Invoke heapgen.tcl with build directory
253 surrounded by quotes (and do so in a portable way).
255 * src/heapgen.tcl: recurse back in on cygwin with correct quoting
256 to allow directories containing spaces. Also in a Solaris shell
259 2000-11-21 Jonathan Larmour <jlarmour@redhat.com>
261 * cdl/memalloc.cdl (CYGSEM_MEMALLOC_MALLOC_ZERO_RETURNS_NULL):
263 * src/malloc.cxx (malloc): Use above option to decide if NULL should
264 be returned on malloc(0).
266 2000-11-01 Jesper Skov <jskov@redhat.com>
268 * tests/realloc.c (main): Use reasonable factor when making too
269 large realloc (targets with 64MB would cause an overflow).
271 2000-10-31 Jonathan Larmour <jlarmour@redhat.com>
273 * tests/testaux.hxx: Prototype cyg_hal_invoke_constructors()
274 [ Forgot to check this in at the same time as below ]
276 2000-10-20 Jonathan Larmour <jlarmour@redhat.com>
278 * tests/dlmalloc1.cxx:
279 * tests/dlmalloc2.cxx:
285 Make sure default priority constructors have been invoked.
287 2000-09-14 Jesper Skov <jskov@redhat.com>
289 * tests/realloc.c (main): fix warning.
290 * tests/malloc1.c (main): Same.
291 * tests/malloc2.c (main): Same.
292 * tests/malloc3.c (main): Same.
294 2000-08-31 Jonathan Larmour <jlarmour@redhat.com>
296 * cdl/memalloc.cdl: Make dlmalloc the default malloc implementation now.
297 Also add info to the variable block and dlmalloc descriptions to
298 describe the pros and cons of these allocators.
300 2000-08-09 Jonathan Larmour <jlarmour@redhat.co.uk>
302 * tests/malloc4.cxx (thrfree): Don't yield at loop end - actually delay
307 2000-08-08 Jonathan Larmour <jlarmour@redhat.co.uk>
309 * tests/malloc4.cxx: Make output more frequent
311 2000-08-04 Jonathan Larmour <jlarmour@redhat.co.uk>
313 * tests/dlmalloc1.cxx (STACKSIZE): Define larger than default.
315 2000-08-03 Jonathan Larmour <jlarmour@redhat.co.uk>
317 * include/dlmallocimpl.hxx (class Cyg_Mempool_dlmalloc_Implementation):
318 Ensure typedefs are public so dlmalloc.cxx can use them at outer level.
320 2000-08-02 Jonathan Larmour <jlarmour@redhat.co.uk>
322 * src/heapgen.tcl: Fix tclsh invocation quoting problems
324 2000-07-31 Jonathan Larmour <jlarmour@redhat.co.uk>
326 * src/heapgen.tcl: Allow builddir to be specified on command-line
327 * cdl/memalloc.cdl: Work around NT cygtclsh80 bug by cd'ing into
328 heapgen.tcl's directory before running it
330 2000-07-26 Jonathan Larmour <jlarmour@redhat.co.uk>
332 * tests/malloc4.cxx: Call rand_r() rather than rand, and use a seed
335 2000-07-25 Jonathan Larmour <jlarmour@redhat.co.uk>
337 * tests/malloc4.cxx (thrfree): Get mem size here. Tidy output.
338 (thrmalloc): Get mem size in thrfree instead
340 * src/heapgen.tcl: Refine search for user-defined name to cope with
341 use of CYG_LABEL_DEFN macro
343 2000-07-19 Jonathan Larmour <jlarmour@redhat.co.uk>
345 * cdl/memalloc.cdl (CYGIMP_MEMALLOC_ALLOCATOR_DLMALLOC_SAFE_MULTIPLE):
348 * include/mvarimpl.inl (resize_alloc): Remember to adjust other
349 freelist entries when extending block
351 2000-07-04 Jonathan Larmour <jlarmour@redhat.co.uk>
355 Created as new package, merging existing memory allocator related stuff
356 from the kernel and libc. Many bug fixes to existing stuff, as
357 well as performance improvements, and extra features such as
358 a port of dlmalloc, and the ability to support multiple disjoint
359 heaps, possibly with run-time configurable size.
360 There's even a bit of documentation, and some new tests
362 //===========================================================================
363 //####ECOSGPLCOPYRIGHTBEGIN####
364 // -------------------------------------------
365 // This file is part of eCos, the Embedded Configurable Operating System.
366 // Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
368 // eCos is free software; you can redistribute it and/or modify it under
369 // the terms of the GNU General Public License as published by the Free
370 // Software Foundation; either version 2 or (at your option) any later version.
372 // eCos is distributed in the hope that it will be useful, but WITHOUT ANY
373 // WARRANTY; without even the implied warranty of MERCHANTABILITY or
374 // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
377 // You should have received a copy of the GNU General Public License along
378 // with eCos; if not, write to the Free Software Foundation, Inc.,
379 // 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
381 // As a special exception, if other files instantiate templates or use macros
382 // or inline functions from this file, or you compile this file and link it
383 // with other works to produce a work based on this file, this file does not
384 // by itself cause the resulting work to be covered by the GNU General Public
385 // License. However the source code for this file must still be made available
386 // in accordance with section (3) of the GNU General Public License.
388 // This exception does not invalidate any other reasons why a work based on
389 // this file might be covered by the GNU General Public License.
391 // Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
392 // at http://sources.redhat.com/ecos/ecos-license/
393 // -------------------------------------------
394 //####ECOSGPLCOPYRIGHTEND####
395 //===========================================================================