Skip to content

feat: remove most calls to GC memory pressure APIs#393

Open
teo-tsirpanis wants to merge 2 commits into
apache:mainfrom
teo-tsirpanis:rm-mem-pressure
Open

feat: remove most calls to GC memory pressure APIs#393
teo-tsirpanis wants to merge 2 commits into
apache:mainfrom
teo-tsirpanis:rm-mem-pressure

Conversation

@teo-tsirpanis

Copy link
Copy Markdown
Contributor

What's Changed

According to documentation (see also dotnet/runtime#33812 (comment)):

The AddMemoryPressure and RemoveMemoryPressure methods improve performance only for types that exclusively depend on finalizers to release the unmanaged resources. It's not necessary to use these methods in types that follow the dispose pattern, where finalizers are used to clean up unmanaged resources only in the event that a consumer of the type forgets to call Dispose. […]

None of the uses of these methods by Arrow satisfies the above criterion. Consequently, this PR removes them, with the exception of MemoryPressureAllocationTracker whose public API contract is to call these methods, and which got obsoleted by this PR.

Closes #50
Closes #261

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Consider batching calls to GC.AddMemoryPressure NativeMemoryAllocator doesn't remove all memory pressure

1 participant