I was following this exercise. This page has instructions to install Valgrind 3.6.1 but this version of Valgrind is not supported by my current Linux kernel version. So, I installed Valgrind 3.11.0 and followed the instructions there after and on running this command: got this error: How to do I fix it? I’m using Ubuntu 14.04 LTS with kernel version
Tag: c++
How to get linux interface alias(IFLA_IFALIAS) programatically for an interface?
We can set alias to an interface using the command To see that; It is set as an alias. Now I want to read this in a C program, and I am not having an idea. I did make a google search, and even tried to look into the iproute2 (provider of this cli), but to no avail. Can any
Unable to link openssl libraries to CLion C++ program
I have a CLion project. Here is my CMakeLists.txt: And here is error that I get: Answer Maybe you should try link_libraries(ssl) instead of link_libraries(openssl), if you’re sure of openssl installed on your local machine. See https://wiki.openssl.org/index.php/Libcrypto_API , it says that “OpenSSL provides two primary libraries: libssl and libcrypto.”. To fix your issue just add to your CMakeList.txt:
How can gcc/clang assume a string constant’s address is 32-bit?
If I compile this program: for x86-64, the asm output uses movl $.LC0, %edi / call puts. (See full asm output / compile options on godbolt.) My question is: How can GCC know that the the string’s address can fit in a 32bit immediate operand? Why doesn’t it need to use movabs $.LC0, %rdi (i.e. a mov r64, imm64, not
How can I find the bridge device name for my tap adapter in C?
On Linux, using C, how can I find the find the name of the bridge device my ethernet interface is attached to? Is there a sequence of ioctl() calls I need to make to find the master bridge device? My C program knows the device name of my TAP adapter from a configuration file (in this case, tap0). Ultimately, I
Pointers and virtual memory [closed]
Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 6 years ago. Improve this question According to my system’s cpuinfo file, each processor in my system has a 39 bit physical address size and a 48 bit virtual address size.
__rdtscp calibration unstable under Linux on Intel Xeon X5550
I’m trying to use __rdtscp intrinsinc function to measure time intervals. Target platform is Linux x64, CPU Intel Xeon X5550. Although constant_tsc flag is set for this processor, calibrating __rdtscp gives very different results: As we can see the difference between program executions can be up to 3 times (125-360). Such instability is not appropriate for any measurements. Here is
linux c get system date format yyyymmdd
I want ask some questions 1) I want get string yyyymmdd of system date using linux c how should I do it ? And I want use this string do some arithmetic, like I have “20160317” I want do 20160317 – 90 get a new date,pls help 2) is there some cleaner way to do this? like if m =
Optimizing C for loops [closed]
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. This question does not appear to be about programming within the scope defined in the help center. Closed 6 years ago. Improve this question I have been trying to optimize my program so far I got down to 8 seconds but my goal its to
sigaction’s signal handler not called in child process
I’ve a program, which installs a signal handler for SIGSEGV. In signal handler ( I try to catch crash ) I restart my application. But when my application is resurrected it doesn’t handle SIGSEGV anymore. Here’s an example: what I get in output is: So I can see sighandler was set in right way, but resurrected app simply crashed silently.