From: YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: "Gardner Bell" <gbell72@rogers.com>,
"Jan Djärv" <jan.h.d@swipnet.se>,
keramida@freebsd.org, emacs-devel@gnu.org
Subject: Re: Emacs 22.1 reproducible crash
Date: Wed, 08 Aug 2007 13:30:53 +0900 [thread overview]
Message-ID: <wlodhiodfm.wl%mituharu@math.s.chiba-u.ac.jp> (raw)
In-Reply-To: <jwv4pjak8ix.fsf-monnier+emacs@gnu.org>
>>>>> On Tue, 07 Aug 2007 23:31:12 -0400, Stefan Monnier <monnier@iro.umontreal.ca> 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
next prev parent reply other threads:[~2007-08-08 4:30 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-30 19:43 Emacs 22.1 reproducible crash Gardner Bell
2007-07-30 23:44 ` Giorgos Keramidas
2007-07-31 1:34 ` YAMAMOTO Mitsuharu
2007-07-31 11:10 ` Gardner Bell
2007-08-07 9:26 ` YAMAMOTO Mitsuharu
2007-08-07 11:58 ` Gardner Bell
2007-08-07 12:03 ` Jan Djärv
2007-08-08 2:32 ` YAMAMOTO Mitsuharu
2007-08-08 3:31 ` Stefan Monnier
2007-08-08 4:30 ` YAMAMOTO Mitsuharu [this message]
2007-08-08 13:04 ` Stefan Monnier
2007-08-08 10:00 ` Giorgos Keramidas
2007-08-08 10:49 ` Giorgos Keramidas
2007-08-08 12:38 ` Jan Djärv
2007-08-08 12:47 ` Giorgos Keramidas
2007-08-09 20:46 ` Gardner Bell
2007-07-31 12:13 ` Giorgos Keramidas
2007-07-31 13:26 ` Giorgos Keramidas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=wlodhiodfm.wl%mituharu@math.s.chiba-u.ac.jp \
--to=mituharu@math.s.chiba-u.ac.jp \
--cc=emacs-devel@gnu.org \
--cc=gbell72@rogers.com \
--cc=jan.h.d@swipnet.se \
--cc=keramida@freebsd.org \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.