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: how can I alloc 64k memory?


li hui wrote:
> 
> I am working on ecos with x86 target.I try to alloc a
> 64k memory. it is very strange that it is correct when
> i compile with -g and download it to target machine by
> serial.But when i chose startup from floppy,it is
> failed alloc such big memory.
> 
> I tried two ways to alloc memory as follow:
> 1.unsigned char img[65536];
> 2.img=(unsigned char*)malloc(65536*sizrof(char))
> 
> use first way,it seems just can alloc memory as large
> as 30*256.

There are differences in the memory layout between RAM and FLOPPY startup.
Although assuming you are using CVS, you should have 640k to play with
already, but maybe it isn't enough. If you want to make the FLOPPY startup
more like RAM, then you will need to edit the memory layout. Increase the
size of the "ram" region from 0xa0000 to whatever the real size of the
memory is. 

Jifl
-- 
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || 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]