[En-Nut-Discussion] heap memory

Gediminas Simanskis gedas at tvk.lt
Wed Jan 21 18:14:43 CET 2004


In my application :

  #define RAMEND ((volatile u_char *)0xF7FF)
  __bss_end   ==  0x008117C

**** begin nutinit.c ******

  if ((int) RAMEND - (int) (&__bss_end) > 384) {
        NutHeapAdd(&__bss_end, (u_short) RAMEND - 256 -
(u_short)(&__bss_end));
         ---skiped---

*** end nutinit.c ***

I don't have heap memory and my application crash!

All works fine with this code:

  if ((unsigned short) RAMEND - (unsigned short) (&__bss_end) > 384) {
        NutHeapAdd(&__bss_end, (u_short) RAMEND - 256 -
(u_short)(&__bss_end));






More information about the En-Nut-Discussion mailing list