Memory Leak When Allocating and Freeing IEEE 1394 Address Ranges

Symptoms

If a device driver for an IEEE 1394 device repeatedly allocates and frees IEEE 1394 address ranges to receive asynchronous requests from IEEE 1394 devices, a small amount of nonpaged pool memory may be allocated after each address range is allocated but not freed after each address range is freed. 

Cause

If the IEEE 1394 device driver specifies an IEEE 1394 address below 0x0020`00000000 when allocating an IEEE 1394 address range via the REQUEST_ALLOCATE_ADDRESS_RANGE IEEE 1394 bus I/O request, the Microsoft IEEE 1394 bus driver allocates an 84-byte block of nonpaged pool memory to track the allocated address range. However, when the IEEE 1394 device driver frees this IEEE 1394 address range via the REQUEST_FREE_ADDRESS_RANGE IEEE 1394 bus I/O request, the Microsoft IEEE 1394 bus driver does not free this memory. 

Resolution

It is possible to work around this problem by performing one of the following actions in the IEEE 1394 device driver that allocates the IEEE 1394 address range:
  • Specify an IEEE 1394 address at or above 0x0020`00000000 when allocating an IEEE 1394 address range via the REQUEST_ALLOCATE_ADDRESS_RANGE IEEE 1394 bus I/O request.
  • Do not specify any IEEE 1394 address (in the Required1394Offset member) when allocating an IEEE 1394 address range via the REQUEST_ALLOCATE_ADDRESS_RANGE IEEE 1394 bus I/O request. This allows the Microsoft IEEE 1394 bus driver to allocate an available address range, which also avoids this problem.

More Information

For more information on allocating IEEE 1394 address ranges for Asynchronous Receive operations from an IEEE 1394 device driver, see the following topics in the Windows Driver Kit (WDK) documentation on the Microsoft Developer Network (MSDN) website:



Properties

Article ID: 2449413 - Last Review: Jan 5, 2011 - Revision: 1

Feedback