I am using trace_printk() to print some numbers (they are around a million number). However when I check /sys/kernel/debug/tracing/trace … only a part of the full range is printed. Can anyone suggest me how to increase the buffer size or any way to print the full range via any option. *Note: I don’t care about the other output of ftrace.
Tag: c++
how to use mmap and shm_open to shared memory among multiple independent processes
I want to share memory among processes, which run independently instead of fork. I’ve read the man page for mmap and shm_open, and still confused about the usage. shared memory, in my mind, should be the mechanism of mapping virtual memory space among different processes, but Why mmap has the fd argument? Does it mean the memory is actually shared
Why does the Code run on Linux but not on Windows?
Well, I wrote a little Program that should generate random values, but no value should be in the output file twice. On Linux it’s running perfectly, but on Windows it just runs infinity long on the 32768th value. That means, that cmd is open but nothing really happens from that point. I already did debug it 30 times by now
Why is MAP_GROWSDOWN mapping does not grow?
I tried to create MAP_GROWSDOWN mapping with the expectation it would grow automatically. As specified in the manual page: MAP_GROWSDOWN This flag is used for stacks. It indicates to the kernel virtual memory system that the mapping should extend downward in memory. The return address is one page lower than the memory area that is actually created in the process’s
What is the difference between closing [close(3)] and clearing [fd_clr(3)] a file descriptor?
I am having problems with an automated software testing, which is blaming use of freed resource when I use fd_clr(3) after using close(3) in a fd. Is there something wrong with doing this? Answer FD_CLR() only changes a local fd_set, which is a C data structure to store info about a list of file descriptors. close() is a system call
Where to find the max resolution for a touchscreen monitor in Linux?
The application that I’m writing has a thread that is constantly polling a /dev/input/eventX location for touch events since the Linux kernel I am running has limited support for touchscreens. Because of this limited support, QT5 does not receive any touch events, and I have to parse the raw event data from the device. My method works, but I am
Linux/ALSA: Callback when frame is written to sound card
I’m new to sound programming and ALSA. I’d like to create a little application, that for example prints out to the console when a frame of data is written to ALSA with snd_pcm_writei(…). Is that possible and if so, how? Currently I’m thinking of registering a callback to ALSA so when an application calls snd_pcm_writei(…) the callback is executed. But
Ubuntu compiling kernel module first time
I’m trying to compile a simple kernel module for the first time: I’ve used obj-m += hello-1.o (that’s the name of the module) but i’m getting an error: obj−m: command not found Why is this happening? I tried looking online for a solution, but nothing I found helped.. EDIT: After modifying based on @Mathieu answer , I get the following
Compile Readline for x86 system (static mode)
I am writing a program in QT Creator, for the x86 architecture, using Debian 9 x86. The program will use GNU Readline library [8.0]. Also, my program must be statically built (QT is already statically built). For this I downloaded Readline from here. Then performed the configuration for the static assembly: then i performed the construction: and installing libraries In
Failed activation of DJI Matrice 100 Drone
I am trying to run a sample application for the Matrice 100 by using ROS on a raspberry Pi 2.I have the Pi connected to the drone via USB-TTL cable to the UART port on the drone. I have my laptop connected to the drone running DJI Assistant 2, and the controller and my iPhone connected wirelessly to the drone