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.

69 lines
1.4 KiB

  1. /*++
  2. Copyright (c) 2000 Microsoft Corporation
  3. Module Name:
  4. GC.hxx
  5. Abstract:
  6. The header file which contains the definitions for the
  7. garbage collection mechanism.
  8. Author:
  9. Kamen Moutafov (kamenm) Apr 2000
  10. Revision History:
  11. Moved some pieces related to garbage collection here, as
  12. well as adding the new garbage collection stuff here
  13. --*/
  14. #if _MSC_VER > 1000
  15. #pragma once
  16. #endif // _MSC_VER > 1000
  17. #ifndef __GC_HXX__
  18. #define __GC_HXX__
  19. extern long GarbageCollectionRequested;
  20. extern unsigned long WaitToGarbageCollectDelay;
  21. extern long PeriodicGarbageCollectItems ;
  22. extern DWORD NextOneTimeCleanup;
  23. extern unsigned int fEnableIdleConnectionCleanup;
  24. extern unsigned int fEnableIdleLrpcSContextsCleanup;
  25. extern unsigned int IocThreadStarted;
  26. #define CO_EVENT_TICKLE_THREAD 0x9993
  27. // forwards
  28. class LRPC_ADDRESS;
  29. extern LRPC_ADDRESS *LrpcAddressList;
  30. inline BOOL
  31. IsGarbageCollectionAvailable (
  32. void
  33. )
  34. {
  35. return (IocThreadStarted || LrpcAddressList);
  36. }
  37. inline RPC_STATUS
  38. TickleIocThread (
  39. void
  40. )
  41. {
  42. return COMMON_PostRuntimeEvent(CO_EVENT_TICKLE_THREAD, NULL);
  43. }
  44. BOOL
  45. CheckIfGCShouldBeTurnedOn (
  46. IN ULONG DestroyedAssociations,
  47. IN const ULONG NumberOfDestroyedAssociationsToSample,
  48. IN const long DestroyedAssociationBatchThreshold,
  49. IN OUT ULARGE_INTEGER *LastDestroyedAssociationsBatchTimestamp
  50. );
  51. #endif // __GC_HXX__