Re: dmarc-noreply@xxxxxxxxxxxxx

  • From: Mike Pall <mikelj-2112@xxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Fri, 3 Dec 2021 16:50:00 +0100

luozhaotian wrote:

OS: Win10
Compiler: Visual Studio 2019 16.10.0
With X64 Debug, the program blocked.
With X64 Release, the program exit normally.

That's a common problem on Windows: you're mixing two different
memory allocators in one program.

The FFI dynamically loads whatever functions are named 'malloc'
and 'free' from the global namespace (ffi.C). But your C/C++
program may compile and link against completely different
functions. This is up to the toolchain and its settings.

--Mike

Other related posts: