Subject: Re: Kernel memory allocation
To: Jaromir Dolecek <jdolecek@NetBSD.org>
From: Park Chan-youn <phygeeks@gmail.com>
List: tech-kern
Date: 02/14/2005 15:04:23
I malloc/free memory for elements of SIMPLEQ(3). In order to implement a
non-blocking read/write to USB endpoints, read/write is done through
read queue/write queue, and the queues are implemented using SIMPLEQ(3).
An element of the queue is a pointer, whose address is allocated using
the malloc/free.
Jaromir Dolecek wrote:
> On Mon, Feb 07, 2005 at 11:32:13AM +0900, Park Chan-youn wrote:
>
>>It will be true, as you expects, that I'm doing some wrong 'freeing' -
>>but it's not evident what is wrong, because vmstat(8) tells USB device
>>does not have the allocated memory any longer after freeing the memory.
>
>
>>3)And again, could you tell me where can I find some good examples using
>> malloc(9) and free(9)?
>
>
> What do you use the malloc/free memory for? For some kind of DMA?
> Do you do the correct bus_dmamap_load/unload properly?
>
> Jaromir