Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Apr 2011 10:48:53 +0100
From:      Bruce Cran <bruce@cran.org.uk>
To:        RW <rwmaillists@googlemail.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Password theft from memory?
Message-ID:  <20110426104853.00005460@unknown>
In-Reply-To: <20110425232908.4104e026@gumby.homeunix.com>
References:  <BANLkTimJWAxW_4OmoeBQrvDDLjD-5Vr5hQ@mail.gmail.com> <BANLkTin_S%2BBRWu79AH16tPdgZd%2BUgZQAzQ@mail.gmail.com> <20110425151846.0a5359fd@gumby.homeunix.com> <20110425151536.GA61425@stainmore> <BANLkTinvvWhEy_A5ao=XWTpQOSTX0Vm2_A@mail.gmail.com> <20110425175420.GA61811@stainmore> <20110425232908.4104e026@gumby.homeunix.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 25 Apr 2011 23:29:08 +0100
RW <rwmaillists@googlemail.com> wrote:

> The reason I thought that heap memory isn't zeroed is from the
> discussion of pre-zeroed pages in this article: 

There's an idlezero task that runs by default (via
the vm.idlezero_enable sysctl), zeroing unused pages, but malloc itself 
doesn't zero memory on demand by default. If you enable the 'Z' 
malloc.conf(3) option it does, though:

Z	     Each byte of new memory allocated by malloc(), realloc() or
	     reallocf() will be initialized to 0.  Note that this initializa-
	     tion only happens once for each byte, so realloc() and reallocf()
	     calls do not zero memory that was previously allocated.  This is
	     intended for debugging and will impact performance negatively.


-- 
Bruce Cran



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110426104853.00005460>