>  On Fri, Nov 15, 2002 at 10:36:18AM -0600, mark tinguely wrote:
>  > since the allocated space is larger that a physical page (65536 > 4096),
>  > bus_dmamem_alloc() allocates physical contiguous memory. After repeated
>  > allocations and frees, the physical memory pages will fragment and the
>  > allocation will fail.
<deleted text>

Chuck Tuffli asks:
>  When the driver frees the memory with bus_dmamem_free(), can other
>  drivers or the kernel not use this memory?

The memory is avaliable to the kernel/drivers when bus_dmamem_free() is
called. The problem for you is that someone else does allocate a
page within the 16 page chunk making it unable to reallocatable by you,
so the next bus_dmamem_alloc() looks for the next 16 page contiguous
chunk. This continues until there is no more 16 page contiguous chunks
available and the bus_dmamem_alloc() fails. FreeBSD does not have a
physical memory defragmenter.

--Mark Tinguely

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to