File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -841,6 +841,10 @@ OSU_EXPORT void nADPFCloseSession(intptr_t sessionPtr) {
841841// giving an additional ~5% clock-frequency boost at the cost of slightly higher
842842// power draw — acceptable for an interactive game session.
843843// preferEfficiency=0 → prefer performance (disable power-efficiency bias).
844+ //
845+ // P/Invoke boundary uses `byte` instead of `bool` because Mono's P/Invoke marshaller
846+ // does not guarantee a 1-byte ABI for C++ `bool`. The native side receives a `byte`
847+ // and converts it via `preferEfficiency != 0` before forwarding to the API's `bool` param.
844848OSU_EXPORT void nADPFSetPreferPowerEfficiency (intptr_t sessionPtr, byte preferEfficiency) {
845849 if (!sessionPtr) return ;
846850
Original file line number Diff line number Diff line change @@ -122,6 +122,8 @@ private void enterSession()
122122 {
123123 try
124124 {
125+ // disallowFullBlockingGC: false — if allocation exceeds the budget,
126+ // the runtime silently reverts to normal GC instead of throwing.
125127 noGCRegionActive = GC . TryStartNoGCRegion ( NO_GC_REGION_BUDGET_BYTES , disallowFullBlockingGC : false ) ;
126128 if ( noGCRegionActive )
127129 Logger . Log ( "High performance session: no-GC region started (64 MB budget)" ) ;
You can’t perform that action at this time.
0 commit comments