Tag Info

Hot answers tagged

6

The linux swapping algorithm works with the concept of "last recently used pages". Each page in virtual memory has an age associated with it. If the page is being frequently accessed then that page is supposed to be quite young in age while if a page is not being accessed, then that page becomes older. The older the pages get, the more likely they may get ...


5

Linux kernel maintainers are listed in the MAINTAINERS file in the kernel source code. There's a specific section for memory management: MEMORY MANAGEMENT L: linux-mm@kvack.org W: http://www.linux-mm.org S: Maintained F: include/linux/mm.h F: include/linux/gfp.h F: include/linux/mmzone.h F: include/linux/memory_hotplug.h ...


3

You don't have to do anything special, apart from providing swap space and mounting it. For processors with a MMU (memory management unit, i.e. most processors since the early 90's) the full address space can be used, although there doesn't have to be real memory (RAM) at all address range locations. If some memory location is addressed, RAM will be ...


3

Yes, it's always in kB. KiB (1024-bytes, not 1000) to be exact. At least in Linux 4.0 (and this code has been largely unchanged since at least April 2005—that's when Linus switched to git, and I don't care to check back further) that output comes from task_mem in fs/proc/task_mmu.c. Excerpting a few lines: seq_printf(m, "VmPeak:\t%8lu kB\n" ...


2

Writing a 1 to drop_caches only drops the ( data ) cache. The 3 also drops the dentry cache, or cache of names of files on the disk. If you had recently been working with directories containing many small files, that would account for it.


2

The kernel manages the memory, so kernel code has access to both kernel and user space. When talking about "kernel space" one usually means pages which are used exclusively by the kernel. "User space" is not a single entity. Each process has its own address space, possibly partially overlapping with other processes. The cache is governed by the kernel and ...


2

Maybe pmap does what you want: $ sudo pmap -Ab75bf022 26746 26746: dhclient -1 -v -pf /run/dhclient.eth5.pid -lf /var/lib/dhcp/dhclient.eth5.leases eth5 b75bf000 4K rw--- ld-2.19.so total 4K Or with a address range and full path: $ sudo pmap -p -Ab75bf022,b77bf022 26746 26746: dhclient -1 -v -pf /run/dhclient.eth5.pid -lf ...


1

HardwareCorrupted show the amount of memory in "poisoned pages", i.e. memory which has failed (as flagged by ECC typically). ECC stands for "Error Correcting Code". ECC memory is capable of correcting small errors and detecting larger ones; on typical PCs with non-ECC memory, memory errors go undetected. If an uncorrectable error is detected using ECC (in ...


1

You can use awk do do this: awk -F'[ -]' -v s=7fb4a84f6008 '$1<=s&&s<$2' /proc/id/maps assuming you can give the searched address (after s=) in the same format as it appears in maps (without 0x and having the same length).


1

In Linux you can use free to see the amount of memory used. Using free before and after a process was executed you might be able to see if all memory is released. Keep in mind though that other applications might have allocated or released memory in the mean time. If you want to monitor a process while it is allocating and/or releasing memory try pmap -x ...


1

The short answer to your question is as much as it possibly can, once it gives processes what they can use. The alternative is to leave the memory free which is wasteful. A machine with 16GB can't use 12GB today so it can use 20GB tomorrow. Any memory not used right this second is potential to save I/O and other effort that's forever lost -- you can't save ...



Only top voted, non community-wiki answers of a minimum length are eligible