أسلوب ICLRMemoryNotificationCallback::OnMemoryNotification
Notifies the وقت تشغيل اللغة العامة (CLR) of the ذاكرة تحميل تشغيل the الكمبيوتر.
HRESULT OnMemoryNotification (
[in] EMemoryAvailable eMemoryAvailable
);
المعلمات
- eMemoryAvailable
[في] واحد of the EMemoryAvailable قيم, indicating the ذاكرة pressure the الكمبيوتر هو currently experiencing.
القيمة المُرجعة
hresult |
الوصف |
---|---|
S_OK |
OnMemoryNotification returned successfully. |
HOST_E_CLRNOTAVAILABLE |
The CLR has not been تم تحميله في a عملية, أو the CLR هو in a الولاية in which it cannot تشغيل مدارة تعليمات برمجية أو عملية the يتصل successfully. |
HOST_E_TIMEOUT |
The يتصل timed خارج. |
HOST_E_NOT_OWNER |
The caller does not own the قفل. |
HOST_E_ABANDONED |
An حدث was canceled while a blocked مؤشر ترابط أو fiber was جارى الإنتظار تشغيل it. |
E_FAIL |
An مجهول catastrophic فشل occurred. بعد إرجاع أسلوب E_FAIL، CLR هو لم تعد قابلة للاستخدام في العملية. المكالمات اللاحقة إلى المضيف للأساليب إرجاع HOST_E_CLRNOTAVAILABLE. |
ملاحظات
The CLR مسجلات a callback إلى OnMemoryNotification بواسطة using a يتصل إلى the IHostMemoryManager::RegisterMemoryNotificationCallback أسلوب. The وقت التشغيل uses the معلومات returned في the callback إلى حر إضافى ذاكرة when the مضيف reports that ذاكرة موارد are تشغيل منخفض.
![]() |
---|
Calls إلى OnMemoryNotification مطلقاً حظر. They دوماً return immediately. |
المتطلبات
الأنظمة الأساسية: See متطلبات النظام إطار عمل .NET.
**Header:**MSCorEE.idl
**المكتبة:**مُضمن كـ مورد في MSCorEE.dll
.NET Framework Versions: 4, 3.5 SP1, 3.5, 3.0 SP1, 3.0, 2.0 SP1, 2.0
راجع أيضًا:
المرجع
أسلوب IHostMemoryManager::RegisterMemoryNotificationCallback