Skip to content

High mem in arm Architecture

High memory (highmem) is used when the size of physical memory approaches or exceeds the maximum size of virtual memory. The traditional split for architectures using this approach is 3:1, 3GiB for userspace and the top 1GiB for kernel space. This means kernel can at most map 1 GiB of physical memory. In mobi…

ALSA: Ways to prevent underrun for speaker

I am playing a single channel audio in non-interleaved mode. I am getting underrun when I am writing audio data into speaker : ALSA lib pcm.c:7339:(snd_pcm_recover) underrun occurred Here is how I write: What are the different ways/parameter configurations to prevent ALSA under run ? (I am using Linux 3.0, AR…

Hide output from expect

Here’s part of an expect script It read password from kwalletcli, and store in variable passwd. So I can connect to the servers with this passwd. However, the output of kwalletcli is pass through expect and show on console. How can I hide that. Answer Try adding to your script. That should turn off the …

How to remove setgid (linux/unix)?

I just changed my file permissions using $ sudo chmod g+s filename and my file permissions turned from drwxr-xr-x to drwxr-sr-x. How do I remove it? Answer Change the + for adding a permission into a – to remove it: If you want to do this programatically, you’ll need to use some bitwise operators. Norma…

Delete a Linux signal handler in C

I use: To add handler of SIGINT event. But how can i delete this handler? Answer Here is what you do: That resets the signal handler back to whatever the default behavior was for that signal (including the default disposition if it hasn’t been set). In the case of SIGINT, it’s aborting your proces…