[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a36005b50706262045g79c4accak21fea740fdc1bffd@mail.gmail.com>
Date: Tue, 26 Jun 2007 20:45:28 -0700
From: "Ulrich Drepper" <drepper@...il.com>
To: "Rik van Riel" <riel@...hat.com>
Cc: "Davide Libenzi" <davidel@...ilserver.org>,
"Linux Kernel Mailing List" <linux-kernel@...r.kernel.org>
Subject: Re: [patch 2/3] MAP_NOZERO - implement sys_brk2()
On 6/26/07, Rik van Riel <riel@...hat.com> wrote:
> Since programs can get back free()d memory after a malloc(),
> with the old contents of the memory intact, surely your
> MAP_NONZERO behavior could be the default for programs that
> can get away with it?
>
> Maybe we could use some magic ELF header, similar to the
> way non-executable stack is handled?
No. This is an implementation detail of the libc version. The malloc
as compiled today is expecting brk-ed memory to be zeroed. This
default can of course be changed (it's a simple define) but you cannot
make this the default behavior for brk.
-
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