Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Modules/_ctypes/malloc_closure.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,17 @@ static void more_core(void)

/* allocate a memory block */
#ifdef MS_WIN32
#ifdef MS_WINDOWS_DESKTOP
item = (ITEM *)VirtualAlloc(NULL,
count * sizeof(ITEM),
MEM_COMMIT,
PAGE_EXECUTE_READWRITE);
#else
item = (ITEM*)VirtualAllocFromApp(NULL,
count * sizeof(ITEM),
MEM_COMMIT | MEM_RESERVE,
PAGE_READWRITE);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this works without EXECUTE, then do we need EXECUTE in the alternative VirtualAlloc call?

#endif
if (item == NULL)
return;
#else
Expand Down
Loading