Explicit Placement of Logical Areas

Top  Previous  Next

The OPT attribute can be used to place a logical area (including a user-defined section) in a specific physical area. For example:

 

task one opt=stack:highram

task two opt=my_seg:lowram

 

The first of these would place the STACK area of task one in the highram physical area. The second would place the my_seg user-define section of task two in the lowram physical area. The processor on which the task is eventually placed must have highram and lowram memory areas; these would normally have been defined for you in the processor's type definition.

 

In very rare and extreme cases, you can place a logical area (including a user-defined section) at an explicit address. For example:

 

opt=thing:0x1000

 

This would result in the thing section of the task being located at absolute address 100016.

 

Dragons003Allocating at explicit addresses usually demonstrates a lack of understanding of how Diamond handles memory for you or a misguided belief that it somehow makes applications more efficient. The only time it is justified is when an external entity (such as a host processor) needs to access objects at fixed addresses; this is rare.