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: configuring heap memory


"David N. Welton" wrote:

> Jonathan Larmour <jlarmour@redhat.com> writes:
>
> > Or you can edit the .ldi and .h files in the include/pkgconf
> > directory. Define a heap2 in exactly the same way (other than the
> > address) as heap1 was defined. Use the definition of heap1 to guide
> > you in how to define heap2.
>
> Here's my stab at an example, at least for i386 floppy (although
> presumably the others might be made to work in a similar fashion?), as
> this seems to be a FAQ:
>
> In heaps.hxx:
>
> #define CYGMEM_HEAP_COUNT 2
>
> Tacked on to the *end* of mlt_i386_pc_floppy.h:
>
> #ifndef __ASSEMBLER__
> extern char CYG_LABEL_NAME (__heap2) [];
> #endif
> #define CYGMEM_SECTION_heap2 (CYG_LABEL_NAME (__heap2))
> #define CYGMEM_SECTION_heap2_SIZE (0xa00000)
>                                    ^^^^^^^^ insert whatever here
>
> The end of mlt_i386_pc_floppy.ldi:
>
>     CYG_LABEL_DEFN(__heap1) = ALIGN (0x8);
>     CYG_LABEL_DEFN(__heap2) = ALIGN (0x8);
>     SECTIONS_END
> }
>
> Those seemed to do the trick for me!
>
> --
> David N. Welton
>    Consulting: http://www.dedasys.com/
>      Personal: http://www.dedasys.com/davidw/
> Free Software: http://www.dedasys.com/freesoftware/
>    Apache Tcl: http://tcl.apache.org/
>
> --
> Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
> and search the list archive: http://sources.redhat.com/ml/ecos-discuss

Thanks David.
This way heap2 will be contiguous to heap1.
How can I specify a different start address for heap2?

Thanks for your help,
Andrea.

--
Ing. Andrea Acquaviva
D.E.I.S. - Universita' di Bologna
V.le Risorgimento, 2    40136 BOLOGNA (ITALY)
Tel: (+39) 051-2093782 Fax: (+39) 051 2093786




-- 
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]