all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Giorgos Keramidas <keramida@ceid.upatras.gr>
Cc: Stefan Monnier <monnier@iro.umontreal.ca>, emacs-devel@gnu.org
Subject: Re: bootstrap & memory allocation troubles
Date: Sat, 14 Jan 2006 22:00:21 +0200	[thread overview]
Message-ID: <20060114200021.GA25438@flame.pc> (raw)
In-Reply-To: <878xtioaww.fsf@srcf.ucam.org>

On 2006-01-14 20:40, Gaute B Strokkenes <gs234@srcf.ucam.org> wrote:
> On 14 jan 2006, monnier@iro.umontreal.ca wrote:
> > Hmm... so all the assertions related to the code that uses posix_memalign
> > succeeded.  That makes me more or more suspect it's a bug in FreeBSD's
> > posix_memalign.  My gut feeling is that calling `free' on a block returned
> > by `posix_memalign' messes up the malloc library's invariants.
>
> >From the node "Aligned Memory Blocks" in the libc manual:
>
>      With the GNU library, you can use `free' to free the blocks that
>   `memalign', `posix_memalign', and `valloc' return.  That does not work
>   in BSD, however--BSD does not provide any way to free such blocks.
>
> If this is information is accurate wrt. FreeBSD then that is probably
> your problem, yes....

That's not true.  The manpage of posix_memalign() states that:

#      Memory that is allocated via posix_memalign() can be used as an argument
#      in subsequent calls to realloc(3), reallocf(3), and free(3).

So if free() messes up malloc's internal data it's a bug in the
posix_memalign() implementation that needs to be fixed.

  reply	other threads:[~2006-01-14 20:00 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-13 15:52 bootstrap & memory allocation troubles Giorgos Keramidas
2006-01-13 20:26 ` Chong Yidong
2006-01-13 21:16 ` Giorgos Keramidas
2006-01-13 21:19 ` Stefan Monnier
2006-01-13 21:24   ` Giorgos Keramidas
2006-01-13 21:38     ` Giorgos Keramidas
2006-01-13 22:13       ` Stefan Monnier
2006-01-13 22:42         ` Giorgos Keramidas
2006-01-14 17:40           ` Stefan Monnier
2006-01-14 19:40             ` Gaute B Strokkenes
2006-01-14 20:00               ` Giorgos Keramidas [this message]
2006-01-14 16:14       ` Richard M. Stallman
2006-01-14 16:52         ` Giorgos Keramidas
2006-01-13 22:12     ` 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=20060114200021.GA25438@flame.pc \
    --to=keramida@ceid.upatras.gr \
    --cc=emacs-devel@gnu.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.