Port-macppc archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
use of malloc(9) for DMA buffers
Hi,
I have a doubt regarding dbdma.c dbdma_alloc(). It uses malloc(9) to
allocate the buffer for the DMA command descriptors:
122: dbdma_command_t *
123: dbdma_alloc(size)
124: int size;
125: {
126: u_int buf;
127:
128: buf = (u_int)malloc(size + 0x0f, M_DEVBUF, M_WAITOK);
129: buf = (buf + 0x0f) & ~0x0f;
130:
131: return (dbdma_command_t *)buf;
132: }
Since these descriptors are directly accessed by hardware, wouldn't
this cause problems if the buffer crosses a page boundary and so it's
not contiguous in physical memory? Or does this never happen?
Thanks,
Marco.
Home |
Main Index |
Thread Index |
Old Index