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: about cygmem_memalloc_heaps variable


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


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