This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Doug Lea's malloc implementation?


On Sat, Aug 10, 2002 at 01:28:45AM -0400, Nikolay V. Pyatkov wrote:
> Hi

> I was debugging GoAhead web server on linux synthetic target. It was
> crashing in the middle of the first page transfer. I traced the
> problem to free() in the "Doug Lea's malloc implementation". The
> values to the free looks fine. At the top of the stack was
> allocation of 4 bytes and free of the same 4 bytes.  I could not get
> any useful information from the dbg. I removed -O2. The same result.
>
> Did anyone see any problems with this package or it is just my setup?

I've not had a problem, so it could be your application/setup.

There is a cdl option you might find interesting. If your application
is corrupting the heap, turning this on may help you find out where
its happening. It looks like you will need to enable asserts in the
infra package as well.

            cdl_option CYGDBG_MEMALLOC_ALLOCATOR_DLMALLOC_DEBUG {
                display       "Debug build"
                requires      CYGDBG_USE_ASSERTS
                default_value { 0 != CYGDBG_USE_ASSERTS }
                description   "
                    Doug Lea's malloc implementation has substantial amounts
                    of internal checking in order to verify the operation
                    and consistency of the allocator. However this imposes
                    substantial overhead on each operation. Therefore this
                    checking may be individually disabled."
            }

I assume you have increased the size of the heap. Synth uses the
fallback malloc pool, which by default is 16K. 

      Andrew

-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]