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

XLARGE memory model & generale performance

Hello community,

Using C166 / ST10 with last version of IDE (µVision V4.00a / C166 V7.00 / L166 V5.25)
We need between 100 & 200Kb data (composed of many structures / array), so we set XLARGE memory model.

General questions about this use :
Is it the best way ?
What's approximately the loss in code execution performance ?
Shall we must use the x... functions to prevent some bug from standard lib with segment boundary (e.g. xmemcpy from string.h) ?
Is there an other solution, because it's non standard functions ?

Thanks in advance.
JM

Parents
  • Hi HS,

    Thanks for your answer !
    Indeed it seems to be the best way, but do you have any idea about the performance ratio between XLARGE & HLARGE ?

    Which is the right instantiation for a xhuge structure ?

    typedef struct _MY_STRUCT
    {
       unsigned char *ptrArray;
       unsigned char array[128Kb];
    }MY_STRUCT;
    
    MY_STRUCT xhuge myStruct;
    


    or

    typedef struct _MY_STRUCT
    {
       unsigned char xhuge *ptrArray;
       unsigned char xhuge array[128Kb];
    }MY_STRUCT;
    
    MY_STRUCT xhuge myStruct;
    

    ptr should be set on all array

    BR,
    JM

Reply
  • Hi HS,

    Thanks for your answer !
    Indeed it seems to be the best way, but do you have any idea about the performance ratio between XLARGE & HLARGE ?

    Which is the right instantiation for a xhuge structure ?

    typedef struct _MY_STRUCT
    {
       unsigned char *ptrArray;
       unsigned char array[128Kb];
    }MY_STRUCT;
    
    MY_STRUCT xhuge myStruct;
    


    or

    typedef struct _MY_STRUCT
    {
       unsigned char xhuge *ptrArray;
       unsigned char xhuge array[128Kb];
    }MY_STRUCT;
    
    MY_STRUCT xhuge myStruct;
    

    ptr should be set on all array

    BR,
    JM

Children