--On Thursday, June 05, 2003 4:27 PM -0600 Steve Holle <> wrote: > 1) What should I try to keep or need to keep in internal memory? Things that are touched often go in internal memory. So does the runtime header. So do any objects touched by the IOP system (eg. SPORT DMA), as their DMA can't reach external memory. All else can spill to external memory. > 2) What items in a typical project would you recommend moving to external > memory? Big buffers that don't use DMA. Infrequently-used code. User interface code (since humans are slow in computer terms). > 3) What are the "$LIBRARIES and $OBJECTS items that show up in each(?) > segment and can they be safely moved to external memory? OBJECTS is all .doj files. LIBRARIES is the .dlb files supplied by ADI. With some care and awareness of what's in the libraries, you can move them to external memory. There are some spots that use self-modifying code and have to do with interrupt processing, and those need to stay in internal memory. You can use elfar (the ELF archive utility) to extract those modules for independent placement. > 4) How do I know when I'm out of Heap? You need 6 words, as I recall, minimum, just to provide an empty heap header. I don't use a heap, only static allocation, to avoid out-of-memory and fragmentation issues at runtime. (For C++ objects, you can use operator placement new to lock them to specific addresses and still get dynamic initialization.) > 5) Do you recommend using the Expert Linker to manipulate segments or going > directly to the ldf file? Personal preference. I haven't played with the Expert Linker, but it looks like it would be useful if you don't know LDF syntax and your needs are fairly simple. > 6) Can anyone point me to a good ap note or tutorial on the how and why of > the linker file? The AD "Linker and Utilities Manual" does a fair job of > how but stinks on why. It's based on the same linker command language that the Gnu linker "ld" (part of the binutils package) uses. Googling around turned up this link: <http://www.gnu.org/manual/ld-2.9.1/html_chapter/ld_3.html> |