Driver Memory Allocation intermittent failure at boot

Cohen, Yossi 0 Reputation points


We are having a PCIe driver issues during loading of the driver as part of the Windows Boot process.

According to Debug printing in the driver we can see that the problem is due to memory allocation error, specific in the AllocateCommonBuffer function of the DmaAdapter.

The driver tries to allocate 1GB using the AllocateCommonBuffer function and the function returns NULL.

This problem happens intermittently (~1 out of 10 times).

We tried to add a retry mechanism (limit of 3 times) in case it fails to see if it changes anything, and the problem still occured.

We also tried to divide by half the size we try to allocate in case there was an error from the AllocateCommonBuffer function and in that case the allocation always worked, but we don't want to change the allocation size (it was only for testing).

We also tried to change the load order group of the driver to see if ot changes anything, but it didn't.

What else can we do to find out why there are times during boot that the allocation does not work? and do you have any idea why this could happen?

OS Version: 21H2 (OS Build 19044. 1526)



Windows Driver Kit (WDK)
Windows Driver Kit (WDK)
A set of Microsoft tools that are used to develop, test, and deploy Windows drivers.
9 questions
0 comments No comments
{count} votes