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]

Dynamic memory/heap sizing question


Hi.

I have some doubts and questions about the way the eCos determines the
amount of RAM available. To be more specific, I have two boards: one has
16MB installed, while the other one has 64MB installed.

Currently, my mlt_*_{rom,ram,romram}.h files define the values of:
CYGMEM_REGION_ram, CYGMEM_REGION_ram_SIZE, CYGMEM_SECTION_heap1 and
CYGMEM_SECTION_heap1_SIZE (among other defines, not relevant here), and
*all* of them are set to support the 16MB board. I would, of course,
like to support the 64MB board, but I'm not sure whether I have the
correct picture of how to do that.

I also read the file:
   packages/services/memalloc/common/current/doc/notes.txt,
describing some aspects of the dynamic heap sizing. It states that, in
order to support for the dynamic RAM sizing, one has to define the macro
HAL_MEM_REAL_REGION_TOP (that implies implementation of the dynamic
detection of installed memory) which takes as a parameter the end of
"unexpanded" memory region and returns the "real" memory region end.

However, I'm uncertain if this is all what is needed, as in main.c of
redboot there's a code that suggests the value of the
CYGMEM_SECTION_heap1_SIZE should be set to the maximum possible value
(in my case 64MB), and the macro HAL_MEM_REAL_REGION_TOP should "reduce"
that value to the 16MB if I'm running eCos on 16MB version of the board.

Or, Maybe I should define CYGMEM_SECTION_heap1_SIZE (and possibly
CYGMEM_REGION_ram_SIZE) to the amount 16MB, and the mentioned macro
HAL_MEM_REAL_REGION_TOP would then "extend" the memory region to the
64MB?

I'm not sure that I mentioned all the involved things, which needs
"tuning" in order for eCos to be able to automatically detect and
support for boards with both 16MB and 64MB of RAM, so I would appreciate
any explanation/suggestions/guidance through this "RAM-issue"...

Thanks in advance!


Regards,
Ivan Horvat.




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


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