[En-Nut-Discussion] Large Arrays -- automatic change of starting??

JasonG jas_g at yahoo.com
Fri Feb 7 18:48:01 CET 2003


So, does everyone that needs large global arrays just make a global
pointer to that same data type, and in NutMain() do the NutHeapAlloc()
and assign the returned void * to the global pointer var?

Any ideas on how much space is available for global vars out of the 4k
after ethernut (ie. the httpd app) takes what it needs?  Is there
anyway that the compiler could auto-inform of inherently breaking the
beginning of the SRAM that NutHeapAdd() assumes is available, or maybe
a flag that NutHeapAdd() uses to know where the end of the
compiler-used SRAM begins so NutHeapAdd() calculates this automagically
and doesn't try to share this area with what the compiler has used?

Thanks,

--- Harald Kipp <harald.kipp at egnite.de> wrote:
> The problem is in nutinit.c
> 
> NutHeapAdd((void *) (RAMEND + 1), (u_short) xramend - RAMEND);
> 
> This call puts _all_ external memory into heap. If you
> don't want this, make a copy of nutinit.c in your app
> directory, modify it and link it instead of lib/nutinit.o
> 
> Any reason, why you can't put the array into heap?
> 
> I think you know
> http://www.ethernut.de/pdf/enmem100.pdf
> 
> Harald
> 
> _______________________________________________
> En-Nut-Discussion mailing list
> En-Nut-Discussion at egnite.de
> http://www.egnite.de/mailman/listinfo/en-nut-discussion


=====
JasonG
jas_g at yahoo.com

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com



More information about the En-Nut-Discussion mailing list