lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] [patch #6822] Patch places memory pools in separate arrays


From: Bill Auerbach
Subject: [lwip-devel] [patch #6822] Patch places memory pools in separate arrays
Date: Thu, 29 Oct 2009 20:25:39 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.4) Gecko/20091016 Firefox/3.5.4 (.NET CLR 3.5.30729)

Follow-up Comment #2, patch #6822 (project lwip):

Sure, rename things as you see fit.  I had to do this for a project using GCC
so is shown here for GCC.  It would apply to several platforms and any others
that use an extern or #pragma to move memory.  It works well - I've finished
one product where I moved 4 pools.

Without the extern statements, all pools are in BSS. In order to move one or
more the compiler will have a #pragma or __attribute__ like GCC does.  So
__attribute__((section( "section_name"))) is GGCs way to move an array to a
new section "section_name".  (Maybe this isn't what you were asking?)

extern u8_t __attribute__((section(".onchip_mem"))) memp_TCP_PCB_base[];

moves memp_TCP_PCB_base to section .onchip_mem.  You assign the address of
this section however the tool's linker specifies the final address of a
section.  In my application, I already had this section and it was placed by
the tools for me since .onchip_mem had a fixed address in the FPGA.

static limits the scope - without it you can see the allocations in the MAP
file to check them out.  Since I would run out of space in .onchip_mem, I
needed to see these arrays to know more about the locations.

memp_bases could be local - it's kind of unorthodox to use a #include within
a function - I never thought about that, but it should be fine and does save
RAM.

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/patch/?6822>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]