2 Replies Latest reply: Sep 19, 2012 11:46 AM by NikMolchanov RSS

    How can I align starting address of a function in shared library?

    NikMolchanov
      We use C++ from Oracle Solaris Studio (latest version) to build our 64-bit shared library,
      and we found out that there is ~10% performance fluctuation depending on the build server,
      that we use to link this shared library. For some reason starting address of one hot function
      in this library may not be aligned to 16 bytes, and in this case the performance of this function
      is low. Is there a way to tell C++ compiler to align this function (or all functions) to 16 bytes?

      Our build servers are Solaris 10 SPARC. Performance is measured on T4 and M3000.
      Compiler options are: -xO4 -xtarget=generic -g

      Thanks.
      Nik

      Edited by: NikMolchanov on Sep 15, 2012 4:46 PM

      Edited by: NikMolchanov on Sep 15, 2012 4:47 PM