I am using the OVERLAY directive as following: OVERLAY(func0 ! *,func1 ! *,func2 ! *,func3 ! *,func4 ! *,func5 ! *) to Excludes the functions from overlay analysis and locates its data and bit segments in non-overlaid memory I don't see any memory usage changes. Am I doing anything wrong? Thanks, Anh
Well, are any of the functions reentrant? If they are, you'll have to use the reentrant keyword. Specifying them without overlay will not avoid data corruption if they are called reentrantly. Jon
No, there are no reentrant functions. int func1(const *d) { unsigned char *buffer; } int func2(unsigned a, struct a **n) { char *name; } func1 calls func2 Using large model I found that: address of buffer: 0x017606 address of name: 0x017608 buffer is generic pointer which should occupy 3 bytes, but linker only allocates 2 bytes. would OVERLAY(func1 ! *,func2 ! *) fix this? How can I fix it? Thanks, Anh
Why don't you just use NOOVERLAY. That way, none of your programs arguments are overlaid? Jon
When you write func1 calls func2, how exactly is that call performed? Do you have evidence beyond the equality of addresses that the generated code is actually incorrect?