Source code of Windows XP (NT5)
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.

167 lines
3.1 KiB

  1. /*++
  2. Copyright (c) 1989 Microsoft Corporation
  3. Module Name:
  4. rxcemm.h
  5. Abstract:
  6. This module contains the memory management functions for RxCe entities.
  7. Revision History:
  8. Balan Sethu Raman [SethuR] 15-Feb-1995
  9. Notes:
  10. --*/
  11. #include <rxcep.h>
  12. PRXCEDB_TRANSPORT_ENTRY RxCeDbAllocateTransportEntry()
  13. /*++
  14. Routine Description:
  15. This routine allocates and initializes a RXCEDB_TRANSPORT_ENTRY structure.
  16. --*/
  17. {
  18. PRXCE_TRANSPORT pTransport = (PRXCE_TRANSPORT)_RxCeAllocate(
  19. sizeof(RXCEDB_TRANSPORT_ENTRY));
  20. if (pTransportEntry != NULL) {
  21. // Initialize the object header
  22. RxCeDbInitializeObjectHeader();
  23. }
  24. return pTransportEntry;
  25. }
  26. PRXCEDB_ADDRESS_ENTRY RxCeDbAllocateAddressEntry()
  27. /*++
  28. Routine Description:
  29. This routine allocates and initializes a RXCEDB_ADDRESS_ENTRY structure.
  30. --*/
  31. {
  32. PRXCEDB_ADDRESS_ENTRY pAddressEntry = (PRXCEDB_ADDRESS_ENTRY)_RxCeAllocate(
  33. sizeof(RXCEDB_ADDRESS_ENTRY));
  34. if (pAddressEntry != NULL) {
  35. RxCeDbInitializeObjectHeader();
  36. }
  37. return pAddressEntry;
  38. }
  39. PRXCEDB_CONNECTION_ENTRY RxCeAllocateConnectionEntry()
  40. /*++
  41. Routine Description:
  42. This routine allocates and initializes a RXCEDB_CONNECTION_ENTRY structure.
  43. --*/
  44. {
  45. PRXCEDB_CONNECTION_ENTRY pConnection = (PRXCE_CONNECTION)_RxCeAllocate(
  46. sizeof(RXCE_CONNECTION),
  47. &s_NoOfConnectionsAllocated);
  48. if (pConnection != NULL) {
  49. InitializeStructHeader(pConnection,,sizeof(RXCE_CONNECTION));
  50. }
  51. return pConnection;
  52. }
  53. PRXCE_VC RxCeAllocateVc()
  54. /*++
  55. Routine Description:
  56. This routine allocates and initializes a RXCE_VC structure.
  57. --*/
  58. {
  59. PRXCE_VC pVc = (PRXCE_VC)_RxCeAllocate(
  60. sizeof(RXCE_VC),
  61. &s_NoOfVcsAllocated);
  62. if (pVc != NULL) {
  63. InitializeStructHeader(pVc,,sizeof(RXCE_VC));
  64. }
  65. return pVc;
  66. }
  67. VOID RxCeFreeTransport(PRXCE_TRANSPORT pTransport)
  68. /*++
  69. Routine Description:
  70. This routine frees the memory allocated for a RXCE_TRANSPORT structure.
  71. Arguments:
  72. pTransport - the RXCE_TRANSPORT instance to be freed.
  73. --*/
  74. {
  75. _RxCeFree(pTransport,&s_NoOfTransportsFreed);
  76. }
  77. VOID RxCeFreeAddress(PRXCE_ADDRESS pAddress)
  78. /*++
  79. Routine Description:
  80. This routine frees the memory allocated for a RXCE_ADDRESS structure.
  81. Arguments:
  82. pAddress - the RXCE_ADDRESS instance to be freed.
  83. --*/
  84. {
  85. _RxCeFree(pAddress,&s_NoOfAddressesFreed);
  86. }
  87. VOID RxCeFreeConnection(PRXCE_CONNECTION pConnection)
  88. /*++
  89. Routine Description:
  90. This routine frees the memory allocated for a RXCE_CONNECTION structure.
  91. Arguments:
  92. pConnection - the RXCE_CONNECTION instance to be freed.
  93. --*/
  94. {
  95. _RxCeFree(pConnection,&s_NoOfConnectionsFreed);
  96. }
  97. VOID RxCeFreeVc(PRXCE_VC pVc)
  98. /*++
  99. Routine Description:
  100. This routine frees the memory allocated for a RXCE_VC structure.
  101. Arguments:
  102. pVc - the RXCE_VC instance to be freed.
  103. --*/
  104. {
  105. _RxCeFree(pVc,&s_NoOfVcsFreed);
  106. }
  107.