SQL CLR memory pressure notification

Google cannot tell me if there is an API available inside the SQL CLR to receive notification of pressure in memory.

It is obviously being used, since the AppDomain will be unloaded under memory pressure, but the question arises whether a notification was sent to the AppDomain before unloading, so that I can free some cache.

(My dll is already running in unsafe mode, so this is not a problem)

+3
source share
1 answer

In SQL 2012, they introduced a new query that allows you to get the current memory usage ...

select survived_memory_kb from sys.dm_clr_appdomains where db_id = DB_ID()

, , , .

0

Source: https://habr.com/ru/post/1736055/


All Articles