0

I wish to improve memory management in a program with many uses of huge matrices. I would like to use the runtime resolved number of bytes in one cache line. There is a function sysconf() in z/OS XL C/C++ to do so.

I this runtime library a third party library, is it freely used in commercial software? Is it working on Windows Visual Studio 2010?

Do you know good ref expanding what is taught in part 6 in tutorial http://www.akkadia.org/drepper/cpumemory.pdf about what developer should do to take hardware into account in memory management (or to increase performance of scientific computing C++ application taking this into account)?

Thanks and regards

kiriloff
  • 25,609
  • 37
  • 148
  • 229
  • 1
    Windows provides API to enumerate processor features. It's a bit convoluted, but this might be a good starting point: [GetLogicalProcessorInformation](http://msdn.microsoft.com/en-us/library/ms683194%28VS.85%29.aspx). Basically you need to look for `CACHE_DESCRIPTOR` items and read the `LineSize` fields. – Hristo Iliev May 17 '12 at 21:42
  • @HristoIliev Thanks. Then, is sysconf() not convenient for Windows VS2010, or are you mentionning some alternative solution? – kiriloff May 18 '12 at 06:25
  • 1
    `sysconf()` is Unix standard (POSIX) library function. You are unlikely to find it on Windows. I propose that you use the API that Windows provides natively. – Hristo Iliev May 18 '12 at 07:09

0 Answers0