From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nathan Lynch Subject: Re: [PATCH 3/4] restart thread safety: remove malloc from genstack Date: Wed, 04 Aug 2010 18:08:56 -0500 Message-ID: <1280963336.9502.1.camel@localhost> References: <1280169472.7875.4290.camel@localhost> <1280509713-6745-3-git-send-email-orenl@cs.columbia.edu> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1280509713-6745-3-git-send-email-orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Oren Laadan Cc: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org List-Id: containers.vger.kernel.org On Fri, 2010-07-30 at 13:08 -0400, Oren Laadan wrote: > We use clone and eclone directly and not through glibc, therefore > must explicitly care about thread-safety of malloc. > > This patch eliminates the use of malloc() in genstack_alloc(). > Use mmap() instead. While an overkill, I don't expect performance > issues of this. Other than a missed conversion of free -> munmap in one of the error paths in genstack_alloc, this looks fine.