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.

77 lines
2.2 KiB

  1. /*++
  2. Copyright (c) 1989 Microsoft Corporation
  3. Module Name:
  4. smbmrxmm.h
  5. Abstract:
  6. This module implements the memory managment routines for the SMB mini redirector
  7. Author:
  8. Balan Sethu Raman [SethuR] 7-March-1995
  9. Revision History:
  10. Notes:
  11. The SMB mini redirector manipulates entities which have very different usage patterns.
  12. They range from very static entities ( which are allocated and freed with a very low
  13. frequency ) to very dynamic entities.
  14. The entities manipulated in the SMB mini redirector are SMBCE_SERVER, SMBCE_NET_ROOT,
  15. SMBCE_VC, SMBCE_SESSION. These represent a connection to a server, a share on a particular
  16. server, a virtual circuit used in the connection and a session for a particular user.
  17. These are not very dynamic, i.e., the allocation/deallocation is very infrequent. The
  18. SMB_EXCHANGE and SMBCE_REQUEST map to the SMB's that are sent along that a connection.
  19. Every file operation in turn maps to a certain number of calls for allocationg/freeing
  20. exchanges and requests. Therefore it is imperative that some form of scavenging/caching
  21. of recently freed entries be maintained to satisfy requests quickly.
  22. In the current implementation the exchanges and requests are implemented using the zone
  23. allocation primitives.
  24. --*/
  25. #ifndef _SMBMRXMM_H_
  26. #define _SMBMRXMM_H_
  27. //
  28. // Object Allocation and deletion
  29. //
  30. extern PVOID
  31. SmbMmAllocateObject(SMBCEDB_OBJECT_TYPE ObjectType);
  32. extern VOID
  33. SmbMmFreeObject(PVOID pObject);
  34. extern PSMBCEDB_SESSION_ENTRY
  35. SmbMmAllocateSessionEntry(PSMBCEDB_SERVER_ENTRY pServerEntry, BOOLEAN RemoteBootSession);
  36. extern VOID
  37. SmbMmFreeSessionEntry(PSMBCEDB_SESSION_ENTRY pSessionEntry);
  38. extern PVOID
  39. SmbMmAllocateExchange(
  40. SMB_EXCHANGE_TYPE ExchangeType,
  41. PVOID pv);
  42. extern VOID
  43. SmbMmFreeExchange(PVOID pExchange);
  44. extern PVOID
  45. SmbMmAllocateServerTransport(SMBCE_SERVER_TRANSPORT_TYPE ServerTransportType);
  46. extern VOID
  47. SmbMmFreeServerTransport(PSMBCE_SERVER_TRANSPORT);
  48. #define SmbMmInitializeHeader(pHeader) \
  49. RtlZeroMemory((pHeader),sizeof(SMBCE_OBJECT_HEADER))
  50. #endif _SMBMRXMM_H_
  51.