4

Google is not able to tell me if there is an API available inside the SQL CLR to get memory pressure notification.

It is obviously used, since the AppDomain will get unloaded under memory pressure, but the question is if the notification is sent to into the AppDomain prior to the unload, so that I could release some cache memory.

(My dll is already running in unsafe mode, so that is a non-issue)

2
  • I would be interested in this as Im having some memory pressure problems running some CLR stuff Commented Nov 28, 2011 at 11:24
  • I didn't find a solution to get any notifications. Commented Dec 6, 2011 at 5:46

1 Answer 1

1

In SQL 2012, they implemented 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()

It doesn't give you the memory pressure, but it does allow you to monitor the usage of memory, and thus adjust based on your own logic.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.