all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Eli Zaretskii <eliz@gnu.org>
Cc: schwab@linux-m68k.org, rms@gnu.org, 11519@debbugs.gnu.org,
	lekktu@gmail.com
Subject: bug#11519: "Wrong type argument: characterp" building custom-deps while boostrapping
Date: Sun, 27 May 2012 22:15:00 -0400	[thread overview]
Message-ID: <jwvsjelunhu.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <83wr41wnu1.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 24 May 2012 19:22:46 +0300")

> I didn't mean STRING_CHAR_*.  I agree that they should be fixed not to
> have such unexpected side effect.  They should be read-only operations.
> As a temporary band-aid for Emacs 24.1, I suggest the change below.

Looks fine (should make the regex.c patch unnecessary).

> You said "malloc", so I took an issue with the MS C runtime
> implementation of malloc.  Since all the other implementations suffer
> from fragmentation, there's no reason to believe that the MS
> implementation avoids that danger.

The problem is inherent to the malloc API, pretty much, yes.

> We could easily turn off buffer relocation in ralloc.c for good, by
> fixing the value of use_relocatable_buffers at zero.  But I'm worried
> that this would cause Emacs on Windows run out of memory (or act as if
> it were) faster.

AFAIK, Emacs under GNU/Linux and Mac OS X uses non-relocatable buffers,
and they don't seem to suffer more from fragmentation problems than
Emacs under Windows.  But yes, unless we use an mmap-style allocation,
it would use more actual memory.

> For example, in an Emacs session that runs for 2
> weeks and has a 200MB working set, I just visited a 1.3GB file, went
> to its middle and typed "C-u 30000 d" to insert 30K characters.  Emacs

For sure editing such large file in a 32bit address space might prove
problematic without relocation, (and even with buffer relocation, some
non-buffer allocation might end up fragmenting the address space too
much) but luckily few people do that (you need to compile
with --wide-int to be able to do that).

> Yet another alternative is to emulate mmap on Windows using the
> equivalent Windows API.  But that requires a research comparing mmap
> features we need and use on Posix platforms with the features offered
> by Windows, to make sure this is at all feasible.

That would be nice.

> Such a research
> would need to be done by someone who knows enough about mmap and is
> willing to do the job.  Do we have such a person on board?

I don't volunteer.


        Stefan





  reply	other threads:[~2012-05-28  2:15 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-19 16:10 bug#11519: "Wrong type argument: characterp" building custom-deps while boostrapping Juanma Barranquero
2012-05-19 16:27 ` Eli Zaretskii
2012-05-19 21:40   ` Juanma Barranquero
2012-05-20 17:27     ` Eli Zaretskii
2012-05-20 19:00       ` Juanma Barranquero
2012-05-21  1:50         ` Stefan Monnier
2012-05-21  2:51           ` Eli Zaretskii
2012-05-21  7:59             ` Andreas Schwab
2012-05-21 17:51               ` Eli Zaretskii
2012-05-21 20:39                 ` Stefan Monnier
2012-05-22 19:00                   ` Eli Zaretskii
2012-05-22 19:19                     ` Stefan Monnier
2012-05-22 19:47                       ` Eli Zaretskii
2012-05-23  0:47                         ` Stefan Monnier
2012-05-23  2:59                           ` Eli Zaretskii
2012-05-23 14:16                             ` Stefan Monnier
2012-05-23 15:23                               ` Ken Brown
2012-05-23 16:52                               ` Eli Zaretskii
2012-05-23 20:07                                 ` Stefan Monnier
2012-05-24 16:22                                   ` Eli Zaretskii
2012-05-28  2:15                                     ` Stefan Monnier [this message]
2012-05-28 16:53                                       ` Eli Zaretskii
2012-05-28 19:44                                         ` Stefan Monnier
2012-05-28 20:47                                           ` Eli Zaretskii
2012-05-29  1:23                                             ` Stefan Monnier
2012-05-29 16:02                                               ` Eli Zaretskii
2012-06-02 20:44                                                 ` Juanma Barranquero
2012-06-03  4:18                                                   ` Eli Zaretskii
2013-12-28  8:41                                                     ` Glenn Morris
2013-12-28  9:48                                                       ` Eli Zaretskii
2012-05-23 17:34                               ` Eli Zaretskii
2012-05-23 14:10                       ` Kenichi Handa
2012-05-23 15:27                         ` Stefan Monnier
2012-05-23 17:02                           ` Eli Zaretskii
2012-05-22 14:38                 ` Kenichi Handa
2012-05-22 19:02                   ` Eli Zaretskii
2012-05-21  1:49       ` Stefan Monnier
2012-05-21  2:50         ` Eli Zaretskii
2012-05-21  3:21           ` Stefan Monnier

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=jwvsjelunhu.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=11519@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=lekktu@gmail.com \
    --cc=rms@gnu.org \
    --cc=schwab@linux-m68k.org \
    /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.