Subject: Re: bus_space annoyance, API change proposal
To: Ben Harris <bjh21@NetBSD.org>
From: Garrett D'Amore <garrett_damore@tadpole.com>
List: tech-kern
Date: 02/16/2006 09:00:54
Ben Harris wrote:
> 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.
>
>
Ah. So its not a pointer to a struct, but a struct itself.
--
Garrett D'Amore, Principal Software Engineer
Tadpole Computer / Computing Technologies Division,
General Dynamics C4 Systems
http://www.tadpolecomputer.com/
Phone: 951 325-2134 Fax: 951 325-2191