This is the mail archive of the
ecos-devel@sources.redhat.com
mailing list for the eCos project.
RE: malloc problem.
- From: "Philip Soeberg" <ecos at soeberg dot net>
- To: <ecos-devel at sources dot redhat dot com>
- Date: Fri, 17 Oct 2003 12:27:44 +0200
- Subject: RE: malloc problem.
Btw,
A new version of dlmalloc exists... (Dated ~aug.17.2002 so I assume it's
been thoroughly tested)
[SNIP from ecos-cvs/../dlmalloc.cxx]
* VERSION 2.6.6 Sun Mar 5 19:10:03 2000 Doug Lea (dl at gee)
Note: There may be an updated version of this malloc obtainable at
ftp://g.oswego.edu/pub/misc/malloc.c
Check before installing!
[/SNIP]
[SNIP from ftp://g.oswego.edu/pub/misc/malloc.c]
V2.7.2 Sat Aug 17 09:07:30 2002 Doug Lea (dl at gee)
* Fix malloc_state bitmap array misdeclaration
V2.7.1 Thu Jul 25 10:58:03 2002 Doug Lea (dl at gee)
* Allow tuning of FIRST_SORTED_BIN_SIZE
* Use PTR_UINT as type for all ptr->int casts. Thanks to John
Belmonte.
* Better detection and support for non-contiguousness of MORECORE.
Thanks to Andreas Mueller, Conal Walsh, and Wolfram Gloger
* Bypass most of malloc if no frees. Thanks To Emery Berger.
* Fix freeing of old top non-contiguous chunk im sysmalloc.
* Raised default trim and map thresholds to 256K.
* Fix mmap-related #defines. Thanks to Lubos Lunak.
* Fix copy macros; added LACKS_FCNTL_H. Thanks to Neal Walfield.
* Branch-free bin calculation
* Default trim and mmap thresholds now 256K.
V2.7.0 Sun Mar 11 14:14:06 2001 Doug Lea (dl at gee)
* Introduce independent_comalloc and independent_calloc.
Thanks to Michael Pachos for motivation and help.
* Make optional .h file available
* Allow > 2GB requests on 32bit systems.
* new WIN32 sbrk, mmap, munmap, lock code from <Walter@GeNeSys-e.de>.
Thanks also to Andreas Mueller <a.mueller at paradatec.de>,
and Anonymous.
* Allow override of MALLOC_ALIGNMENT (Thanks to Ruud Waij for
helping test this.)
* memalign: check alignment arg
* realloc: don't try to shift chunks backwards, since this
leads to more fragmentation in some programs and doesn't
seem to help in any others.
* Collect all cases in malloc requiring system memory into sYSMALLOc
* Use mmap as backup to sbrk
* Place all internal state in malloc_state
* Introduce fastbins (although similar to 2.5.1)
* Many minor tunings and cosmetic improvements
* Introduce USE_PUBLIC_MALLOC_WRAPPERS, USE_MALLOC_LOCK
* Introduce MALLOC_FAILURE_ACTION, MORECORE_CONTIGUOUS
Thanks to Tony E. Bennett <tbennett@nvidia.com> and others.
* Include errno.h to support default failure action.
V2.6.6 Sun Dec 5 07:42:19 1999 Doug Lea (dl at gee)
...
[/SNIP]
Regards.
-=[ Philip Soeberg ]=[ philip@soeberg.net ]=-
* I am happy as a clam
(ignoring the issue of why or when a clam might be particularly happy)
-----Original Message-----
From: ecos-devel-owner@sources.redhat.com
[mailto:ecos-devel-owner@sources.redhat.com] On Behalf Of Jonathan Larmour
Sent: 11. oktober 2003 21:55
To: Hadi Dewan
Cc: ecos-devel@sources.redhat.com
Subject: Re: malloc problem.
Andrew Lunn wrote:
>>
>>Now my system just crashes when I do "printf". However
>>if I dont use malloc. My program is fine.
>>
>>I used gdb to debug it further, I found "printf"
>>crashs while doing some memcpy.
>
>
> First thing i would try is to enable assert. I would then run some of
> the test programs. tm_basic, dlmalloc[12] malloc[1234]. See if they
> work correctly or fail.
And particularly "heaptest".
Jifl
--
eCosCentric http://www.eCosCentric.com/ The eCos and RedBoot experts
--["No sense being pessimistic, it wouldn't work anyway"]-- Opinions==mine