[ECOS] about cygmem_memalloc_heaps variable

Jonathan Larmour jlarmour@redhat.com
Wed May 15 10:01:00 GMT 2002


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



More information about the Ecos-discuss mailing list