From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#11519: "Wrong type argument: characterp" building custom-deps while boostrapping Date: Sun, 27 May 2012 22:15:00 -0400 Message-ID: References: <83d360yw48.fsf@gnu.org> <834nrazrtl.fsf@gnu.org> <831umez1p7.fsf@gnu.org> <83vcjpxw18.fsf@gnu.org> <83k404xcpt.fsf@gnu.org> <83hav8xak1.fsf@gnu.org> <83ehqby542.fsf@gnu.org> <838vgiyh4q.fsf@gnu.org> <83wr41wnu1.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1338171359 23482 80.91.229.3 (28 May 2012 02:15:59 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 28 May 2012 02:15:59 +0000 (UTC) Cc: schwab@linux-m68k.org, rms@gnu.org, 11519@debbugs.gnu.org, lekktu@gmail.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon May 28 04:15:56 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SYpUw-000567-L9 for geb-bug-gnu-emacs@m.gmane.org; Mon, 28 May 2012 04:15:54 +0200 Original-Received: from localhost ([::1]:43745 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SYpUw-00088V-6I for geb-bug-gnu-emacs@m.gmane.org; Sun, 27 May 2012 22:15:54 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:43064) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SYpUs-00088N-GE for bug-gnu-emacs@gnu.org; Sun, 27 May 2012 22:15:51 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SYpUq-00040D-3G for bug-gnu-emacs@gnu.org; Sun, 27 May 2012 22:15:50 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:36406) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SYpUp-000404-Um for bug-gnu-emacs@gnu.org; Sun, 27 May 2012 22:15:48 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SYpW2-0005xI-2K for bug-gnu-emacs@gnu.org; Sun, 27 May 2012 22:17:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 28 May 2012 02:17:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11519 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 11519-submit@debbugs.gnu.org id=B11519.133817138522845 (code B ref 11519); Mon, 28 May 2012 02:17:01 +0000 Original-Received: (at 11519) by debbugs.gnu.org; 28 May 2012 02:16:25 +0000 Original-Received: from localhost ([127.0.0.1]:45952 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SYpVQ-0005wQ-ID for submit@debbugs.gnu.org; Sun, 27 May 2012 22:16:24 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:9086) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SYpVN-0005wC-TM for 11519@debbugs.gnu.org; Sun, 27 May 2012 22:16:22 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Au0FAG6Zu09MCpYd/2dsb2JhbABEr1qEN4EIghUBAQQBViMFCws0EhQYDRABE4gcBboJkEQDozOBWIMFgToa X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="183050477" Original-Received: from 76-10-150-29.dsl.teksavvy.com (HELO ceviche.home) ([76.10.150.29]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 27 May 2012 22:15:00 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id 2A6FF660E0; Sun, 27 May 2012 22:15:00 -0400 (EDT) In-Reply-To: <83wr41wnu1.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 24 May 2012 19:22:46 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:60409 Archived-At: > 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