This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

OVERLAY

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

Parents
  • 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

Reply
  • 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

Children