This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: about cygmem_memalloc_heaps variable
- From: Jonathan Larmour <jlarmour at redhat dot com>
- To: peter_ku <peter_ku at issc dot com dot tw>
- Cc: ecos-discuss at sources dot redhat dot com
- Date: Wed, 15 May 2002 18:01:10 +0100
- Subject: Re: [ECOS] about cygmem_memalloc_heaps variable
- Organization: Red Hat UK Ltd.
- References: <000201c1fb4b$9bce6bc0$790114ac@issc.com.tw>
peter_ku wrote:
>
> Hi
>
> My hw-target is E7T, when I trace the code
>
> in malloc.cxx
> # define POOL (*cygmem_memalloc_heaps[0])
>
> void *
> malloc( size_t size )
> {
> .....
> data_ptr = POOL.try_alloc( size );
> .....
> }
>
> in heap.hxx
> extern Cyg_Mempool_dlmalloc *cygmem_memalloc_heaps[ 2 ];
>
> I can't see where to declare the cygmem_memalloc_heaps variable.
It comes from a file that is automatically generated by a script called
heapgen.tcl. The file will be in your install tree as
include/pkgconf/heaps.hxx. It goes hand in hand with a file called
heaps.cxx that is similarly generated and compiled in the build tree.
Jifl
--
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
--[ "You can complain because roses have thorns, or you ]--
--[ can rejoice because thorns have roses." -Lincoln ]-- Opinions==mine
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss