Displaying 1 result from an estimated 1 matches for "_sc_level1_dcache_linesize".
2017 Sep 17
0
sysconf and _SC_LEVEL1_DCACHE_LINESIZE returns 0?
.../gcc.gnu.org/wiki/CompileFarm):
$ cat /etc/centos-release
CentOS Linux release 7.3.1611 (AltArch)
I'm trying to determine L1 data cache size. When the following code
runs it returns 0. The man pages state -1 is an error, so I think its
claiming to succeed.
cacheLineSize = sysconf(_SC_LEVEL1_DCACHE_LINESIZE);
GCC119, which is also a S822 Power8 running AIX, returns 128.
Does anyone know what I might be doing wrong under Cent? Or maybe, how
can I retrieve the L1 data cache line size?
Thanks in advance.