|
俺目前在wince平台上做一200W 摄像头驱动,需要分配7.32M DMA buffer给CPU作帧的传输,发现当我把程序内存调到32M(此时存储内存为13M)的时候DMA buffer分配失败,请问有谁知道具体原因吗?我采用的DMA buffer分配的程序如下:
DMA_ADAPTER_OBJECT Adapter;
memset(&Adapter, 0, sizeof(DMA_ADAPTER_OBJECT));
Adapter.InterfaceType = Internal;
Adapter.ObjectSize = sizeof(DMA_ADAPTER_OBJECT);
m_pVirtCodecAddr = (PBYTE)HalAllocateCommonBuffer(&Adapter, Size,&m_lnPhysCodecAddr, FALSE);
if (m_pVirtCodecAddr == NULL)
{
hr = E_FAIL;
RETAILMSG(1, (TEXT("Failed to allocate DMA buffer for Codec.\r\n")));
} |
|