Re: kmem_alloc replacement in Tiger
Re: kmem_alloc replacement in Tiger
- Subject: Re: kmem_alloc replacement in Tiger
- From: Andrew Gallatin <email@hidden>
- Date: Tue, 31 Jan 2006 09:00:19 -0500 (EST)
Terry Lambert writes:
>
> On Jan 30, 2006, at 8:06 PM, Herbert wrote:
> > I am trying to replace kmem_alloc with another equivalent call in
> > Tiger.
> >
> > It was suggested that I used OSMalloc instead, but this won't work
> > since it does not get it's memory from the same place.
> >
> > Basically, I have to allocate a huge chunk (4+ MB) for an array, so
> > I need basic access.
> >
> > We are currently looking at IOBufferMemory etc., but we're not sure
> > if it will work.
> >
> > Has anyone had to deal with this?
>
>
> Unless you are creating your own submap, the memory all comes from the
> same place: kernel_map and the underlying implementation is all the
> same code.
At least for non pageable memory, OSMalloc will allocate memory using
kalloc. The kalloc() routine uses the kalloc_map submap, which is
only 16MB in size.
Drew
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden