[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Menus and w32 memory management

From: Lennart Borgman
Subject: Re: Menus and w32 memory management
Date: Mon, 2 Jun 2014 20:54:10 +0200

On Mon, Jun 2, 2014 at 6:07 PM, Eli Zaretskii <address@hidden> wrote:
>> Date: Mon, 02 Jun 2014 18:21:26 +0400
>> From: Dmitry Antipov <address@hidden>
>> CC: Eli Zaretskii <address@hidden>
>> 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 via email to

[Prev in Thread] Current Thread [Next in Thread]