Skip to content
Advertisement

Tag: c++

C++: How can statvfs take a structure of its own type as an input?

I am using statvfs to check the filesystem, and I have difficulties understanding how the following snippet works: I include the header. This is the only line that’s 100% clear to me here. I make aStructure of the type statvfs. I call statvfs with aPath and the structure from the previous step. In 2. statvfs was a structure, in 3.

Organize multitrheading datalogging [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 2 years ago. Improve this question I’m working on a C project for an embedded target running a Linux distribution (build with Yocto). I’m new to Linux embedded world and I

Measuring Elapsed Time Using clock_gettime(CLOCK_MONOTONIC)

I have to elapse the measuring time during multiple threads. I must get an output like this: Firstly, I used gettimeofday but I saw that there are some negative numbers then I made little research and learn that gettimeofday is not reliable to measure elapsed time. Then I decide to use clock_gettime(CLOCK_MONOTONIC). However, there is a problem. When I use

Is there a linux equivalent of _aligned_realloc

Is there a linux equivalent of _aligned_realloc? I want to use realloc so I don’t have to memcpy the data every time I resize it. Am I stuck with mmap? I only used mmap once is there a recommended way of implementing memory that will be resized a few times? I’m assuming I can’t mix mmap with aligned_alloc and I

Advertisement