Skip to content

[fix] Keep global copy of opened backends.#17

Merged
again4you merged 1 commit intonnstreamer:mainfrom
anyj0527:pin-current-backend
Jan 22, 2026
Merged

[fix] Keep global copy of opened backends.#17
again4you merged 1 commit intonnstreamer:mainfrom
anyj0527:pin-current-backend

Conversation

@anyj0527
Copy link
Member

  • Maintaining a global copy of opened backends in GHashTable to mitigate memory fragmentation in iterations of [hal_ml_create - hal_ml_destroy] which load and unload backend libraries.
  • This extra reference prevents the underlying library from being unloaded when the user calls hal_ml_destroy.
  • Adding a destructor function to release pinned backends.

This would resolve this issue

@anyj0527 anyj0527 requested a review from a team as a code owner January 16, 2026 06:43
- Maintaining a global copy of opened backends in GHashTable to mitigate
  memory fragmentation in iterations of [hal_ml_create -
  hal_ml_destroy] which load and unload backend libraries.
- This extra reference prevents the underlying library from being unloaded when the user calls hal_ml_destroy.
- Adding a destructor function to release pinned backends.

This would resolve [this issue](https://github.sec.samsung.net/OASIS/ML-Service-API-DA-Examples/issues/12)

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
@anyj0527 anyj0527 force-pushed the pin-current-backend branch from 7ccde0b to bd94678 Compare January 16, 2026 07:43
@abhajaswal
Copy link

LGTM . Pipeline mode seems to be fixed with this commit for amlogic ,
Checking others thanks

Copy link

@again4you again4you left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job!

@again4you again4you merged commit 396fc7b into nnstreamer:main Jan 22, 2026
4 checks passed
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.

4 participants