Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

84 lines
1.4 KiB

  1. /*++
  2. Copyright (c) 2002-2002 Microsoft Corporation
  3. Module Name:
  4. scavenger.h
  5. Abstract:
  6. The cache scavenger private declarations
  7. Author:
  8. Karthik Mahesh (KarthikM) Feb-2002
  9. Revision History:
  10. --*/
  11. #ifndef _SCAVENGERP_H_
  12. #define _SCAVENGERP_H_
  13. #define SCAVENGER_MAX_AGE 10
  14. //
  15. // Scavenger Thread Event Types. These are Indices in global array
  16. // of PKEVENTs g_ScavengerAllEvents
  17. //
  18. enum {
  19. SCAVENGER_TERMINATE_THREAD_EVENT = 0, // Set on Shutdown
  20. SCAVENGER_TIMER_EVENT, // Set periodically by timer DPC
  21. SCAVENGER_LOW_MEM_EVENT, // Set by system on low memory condition
  22. SCAVENGER_LIMIT_EXCEEDED_EVENT, // Set by UlSetScavengerLimitEvent if cache size limit is exceeded
  23. SCAVENGER_NUM_EVENTS
  24. };
  25. #define LOW_MEM_EVENT_NAME L"\\KernelObjects\\LowMemoryCondition"
  26. //
  27. // Min interval (seconds) between successive
  28. // scavenger calls
  29. //
  30. #define DEFAULT_MIN_SCAVENGER_INTERVAL (4)
  31. VOID
  32. UlpSetScavengerTimer(
  33. VOID
  34. );
  35. VOID
  36. UlpScavengerTimerDpcRoutine(
  37. IN PKDPC Dpc,
  38. IN PVOID DeferredContext,
  39. IN PVOID SystemArgument1,
  40. IN PVOID SystemArgument2
  41. );
  42. VOID
  43. UlpScavengerThread(
  44. IN PVOID Context
  45. );
  46. VOID
  47. UlpScavengerPeriodicEventHandler(
  48. VOID
  49. );
  50. VOID
  51. UlpScavengerLowMemoryEventHandler(
  52. VOID
  53. );
  54. VOID
  55. UlpScavengerLimitEventHandler(
  56. VOID
  57. );
  58. #endif // _SCAVENGERP_H_