Code optimization where "problems" are in libc

I have C ++ code, and I play with Intel VTune, and I did a general analysis of the study and don’t know how to interpret the results. It puts the number of Retire Stalls as a problem .

Actually, this is enough to confuse me, because I'm probably over my head. But the functions that he lists as having an abnormal number of remote stalls make up _int_mallocand malloc_consolidate, as in libc. So I can’t even look at my own code and try to figure out, and this is not something that I really can start to change.

Is there a way to use this information to improve my own code? Or does it just mean that I have to find ways to distribute less or less?

(Note: the specific code at hand is not a problem, I am looking for strategies to interpret the data and improve the situation when hot spots or stalls or something like a “problem” may occur in the code outside my control)

+3
source share
2 answers

Is there a way to use this information to improve my own code? Or does it just mean that I have to find ways to distribute less or less often?

Yes , it seems like you have to make changes to your code so that malloc is called less often.

  • Is heap allocation really necessary?

  • , ?

  • ?

  • ? , , , ?

. 20 , . Linux, Windows. Windows .

+5
  • , malloc
  • thread-local-storage
  • , , , ( list:: splice )
  • boost, ,
+2

All Articles