Subject: Re: bus_space annoyance, API change proposal
To: Garrett D'Amore <garrett_damore@tadpole.com>
From: Ben Harris <bjh21@NetBSD.org>
List: tech-kern
Date: 02/16/2006 16:48:43
On Thu, 16 Feb 2006, Garrett D'Amore wrote:

> If your bus_space_handle_t is a structure, and you allocate a new one in
> bus_space_subregion(), then how does it get freed?  Most likely you are
> leaking those structures right now.  (I've not checked the code tho'.)

bus_space_subregion() doesn't allocate anything.  It gets passed a pointer 
to the structure and fills it in.  It's up to the caller to allocate and 
free the structure, just as with any other kind of bus_space_handle_t.

-- 
Ben Harris                                                   <bjh21@NetBSD.org>
Portmaster, NetBSD/acorn26           <URL:http://www.NetBSD.org/Ports/acorn26/>