User Guide

  • 2020
  • 06/18/2020
  • Public Content
Contents

Memory That is Accessed Through a Pointer

In the topic Pointer Dereferences, we saw that there are techniques for dealing with incidental sharing of pointer-accessed storage in particular cases.
In general, to deal with sharing problems at indirect references you have to really understand what your program is doing. You cannot just do a text search for all the uses of a shared location and apply some transformation mechanically.
Although you may not know which memory location is being accessed by an indirect reference, you may be able to tell that a set of indirect references using the same pointer value implement an independent update pattern. The process for synchronizing independent updates of indirect references is the same as for variables. The only special concern is that you need to use the same lock for all data accesses that might be accessing the same memory locations. Using the same lock in more places means that your tasks will spend more time waiting for it.
Finally, your design may have tasks working on separate parts of a larger data structure. If you find sharing problems, it may be that the parts are not as independent as designed. In that case, you are likely to get the best results by disentangling the data structures to resolve the sharing problems.

Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804