unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Lennart Borgman <lennart.borgman@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Dmitry Antipov <dmantipov@yandex.ru>,
	Emacs-Devel devel <emacs-devel@gnu.org>
Subject: Re: Menus and w32 memory management
Date: Mon, 2 Jun 2014 20:54:10 +0200	[thread overview]
Message-ID: <CANbX366x9ysXw8FqqMg8rtvQLxSpZj4sxzSb5i9DAPNq2SVEOA@mail.gmail.com> (raw)
In-Reply-To: <83tx839txy.fsf@gnu.org>

On Mon, Jun 2, 2014 at 6:07 PM, Eli Zaretskii <eliz@gnu.org> wrote:
>> Date: Mon, 02 Jun 2014 18:21:26 +0400
>> From: Dmitry Antipov <dmantipov@yandex.ru>
>> CC: Eli Zaretskii <eliz@gnu.org>
>>
>> Looking through src/w32gui.h, I found the following fragment:
>>
>> /* Local memory management for menus.  */
>> #define local_heap (GetProcessHeap ())
>> #define local_alloc(n) (HeapAlloc (local_heap, HEAP_ZERO_MEMORY, (n)))
>> #define local_free(p) (HeapFree (local_heap, 0, ((LPVOID) (p))))
>>
>> #define malloc_widget_value() ((widget_value *) local_alloc (sizeof (widget_value)))
>> #define free_widget_value(wv) (local_free ((wv)))
>
> This code is very old.  We've been using separate allocation APIs
> there since almost day one.  I have no idea why (and know very little
> about it anyway).

FYI. In my a couple of years old (patched) version of Emacs I have
constandly seen small memory corruptions in the menus since I moved to
64-bit MS Windows 7. I have no idea about the reason. I did not see
those problems on 32-bit Windows. The executable is 32-bit (since I
did not had time to look into recompiling with 64-bit tools then, too
much problems).



  reply	other threads:[~2014-06-02 18:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-02 14:21 Menus and w32 memory management Dmitry Antipov
2014-06-02 16:07 ` Eli Zaretskii
2014-06-02 18:54   ` Lennart Borgman [this message]
2014-06-02 19:02     ` Eli Zaretskii
2014-06-02 19:40       ` Lennart Borgman

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CANbX366x9ysXw8FqqMg8rtvQLxSpZj4sxzSb5i9DAPNq2SVEOA@mail.gmail.com \
    --to=lennart.borgman@gmail.com \
    --cc=dmantipov@yandex.ru \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).