From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: YAMAMOTO Mitsuharu Newsgroups: gmane.emacs.devel Subject: Re: Emacs 22.1 reproducible crash Date: Wed, 08 Aug 2007 13:30:53 +0900 Organization: Faculty of Science, Chiba University Message-ID: References: <38018.65621.qm@web88014.mail.re2.yahoo.com> <46B85FA7.4060000@swipnet.se> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Trace: sea.gmane.org 1186547468 31809 80.91.229.12 (8 Aug 2007 04:31:08 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 8 Aug 2007 04:31:08 +0000 (UTC) Cc: Gardner Bell , Jan =?ISO-8859-1?Q?Dj=E4rv?= , keramida@freebsd.org, emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Aug 08 06:31:05 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IIdCI-0004c3-Ve for ged-emacs-devel@m.gmane.org; Wed, 08 Aug 2007 06:31:03 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IIdCH-0003DW-Vo for ged-emacs-devel@m.gmane.org; Wed, 08 Aug 2007 00:31:02 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IIdCE-0003DH-8y for emacs-devel@gnu.org; Wed, 08 Aug 2007 00:30:58 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IIdCC-0003D5-Rw for emacs-devel@gnu.org; Wed, 08 Aug 2007 00:30:57 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IIdCC-0003D2-Lj for emacs-devel@gnu.org; Wed, 08 Aug 2007 00:30:56 -0400 Original-Received: from mathmail.math.s.chiba-u.ac.jp ([133.82.132.2]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IIdCB-0007Ft-OQ for emacs-devel@gnu.org; Wed, 08 Aug 2007 00:30:56 -0400 Original-Received: from church.math.s.chiba-u.ac.jp (church [133.82.132.36]) by mathmail.math.s.chiba-u.ac.jp (Postfix) with ESMTP id ADA5B2C43; Wed, 8 Aug 2007 13:30:53 +0900 (JST) In-Reply-To: User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.6 Emacs/22.1.50 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI) X-Detected-Kernel: NetBSD 3.0 (DF) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:76178 Archived-At: >>>>> On Tue, 07 Aug 2007 23:31:12 -0400, Stefan Monnier said: >> + int >> + posix_memalign (memptr, alignment, size) >> + __ptr_t *memptr; >> + __malloc_size_t alignment; >> + __malloc_size_t size; >> + { >> + __ptr_t mem; >> + >> + if (alignment % sizeof (__ptr_t) != 0 >> + || (alignment & (alignment - 1)) != 0) >> + return EINVAL; >> + >> + mem = memalign (alignment, size); >> + if (mem == NULL) >> + return ENOMEM; >> + >> + *memptr = mem; >> + >> + return 0; >> + } > Can the result be freed by passing it to `free'? > That's a very important part of the spec. Yes. The function `memalign', which is also implemented in gmalloc.c, records the original return value of `malloc' in the linear list starting from `_aligned_blocks', and `free' looks through it first. YAMAMOTO Mitsuharu mituharu@math.s.chiba-u.ac.jp