lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.00.1211271359260.23576@chino.kir.corp.google.com>
Date:	Tue, 27 Nov 2012 14:00:16 -0800 (PST)
From:	David Rientjes <rientjes@...gle.com>
To:	Bernd Schubert <bernd.schubert@...m.fraunhofer.de>
cc:	linux-kernel@...r.kernel.org
Subject: Re: memory allocation: smap large "Size", but unused

On Tue, 27 Nov 2012, Bernd Schubert wrote:

> I'm just investigating why a user space program has a rather large VmSize, but
> small VmRSS size. Looking into /proc/$pid/smaps I notice several areas with an
> size of about 64MB, but otherwise that area is unused. So far I did not find a
> way how to reproduce that with malloc() calls.
> 
> 7ffd34021000-7ffd38000000 ---p 00000000 00:00 0
> Size:              65404 kB
> Rss:                   0 kB

What happens if you do

	sbrk(65404 << 10);
	sleep(1000);

and check /proc/pid/smaps?  Ah, a memory range need not have any pages in 
memory.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ