MADCSHARP Telegram 8
Managed to implement calls with IL calli opcodes, both to managed and unmanaged function pointers.
This tricks could be used to manual function devirtualizing and calling managed functions without reflection and GC/boxing allocations.

FuncUnity wrapper is perfect to use within Unity because IL2CPP RuntimeMethodHandle.Value is an ACTUAL function pointer, and in Mono land this structure contains GetFunctionPointer(). This wrapper expects IL2CPP function pointer to be marked with (funcPtr | 0x80000000000000), that's beyond application address space, so we are safe here.

Of course it's possible to use FuncManaged with IL2CPP, but it could be not peak perf tho.



tgoop.com/madcsharp/8
Create:
Last Update:

Managed to implement calls with IL calli opcodes, both to managed and unmanaged function pointers.
This tricks could be used to manual function devirtualizing and calling managed functions without reflection and GC/boxing allocations.

FuncUnity wrapper is perfect to use within Unity because IL2CPP RuntimeMethodHandle.Value is an ACTUAL function pointer, and in Mono land this structure contains GetFunctionPointer(). This wrapper expects IL2CPP function pointer to be marked with (funcPtr | 0x80000000000000), that's beyond application address space, so we are safe here.

Of course it's possible to use FuncManaged with IL2CPP, but it could be not peak perf tho.

BY MadSharp: Unsafe




Share with your friend now:
tgoop.com/madcsharp/8

View MORE
Open in Telegram


Telegram News

Date: |

Ng was convicted in April for conspiracy to incite a riot, public nuisance, arson, criminal damage, manufacturing of explosives, administering poison and wounding with intent to do grievous bodily harm between October 2019 and June 2020. Your posting frequency depends on the topic of your channel. If you have a news channel, it’s OK to publish new content every day (or even every hour). For other industries, stick with 2-3 large posts a week. The best encrypted messaging apps The public channel had more than 109,000 subscribers, Judge Hui said. Ng had the power to remove or amend the messages in the channel, but he “allowed them to exist.” Administrators
from us


Telegram MadSharp: Unsafe
FROM American