mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-12 02:00:37 +02:00
This function must be able to handle both guest heap pointers *and* host heap pointers, so it only forwards to the native host library for the latter. This is because Xlibint users allocate memory using internal macros aliasing to libc's malloc but then they free using the function XFree. For libX11, this is not a problem since the allocation happens in a thunked API function (and hence on the host heap), but if a function from an unthunked library accesses Xlibint, it will allocate on the guest heap. One notable example where this was encountered is XF86VidModeGetAllModeLines.