Unnecessary Garbage collection triggered by .NET wrapper
Brought to you by:
orenmnero
Message.h in the .NET wrapper calls GC::AddMemoryPressure(2048) then GC::RemoveMemoryPressure(2048)
The MSDN documentation says that AddMemoryPressure can be used to:
"Inform the runtime of a large allocation of unmanaged memory that should be taken into account when scheduling garbage collection."
2K hardly constitutes a large allocation of unmanaged memory, The problem with doing this is it sometimes triggers a complete garbage collection cycle at a time when the application is concerned about latency.
These calls are unnecessary and should be removed.
Dale