Re: kmem_alloc replacement in Tiger
Re: kmem_alloc replacement in Tiger
- Subject: Re: kmem_alloc replacement in Tiger
- From: Terry Lambert <email@hidden>
- Date: Mon, 30 Jan 2006 22:22:54 -0800
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.
<http://darwinsource.opendarwin.org/10.4/xnu-792/osfmk/kern/kalloc.c>
<http://darwinsource.opendarwin.org/10.4/xnu-792/osfmk/vm/vm_kern.c>
P.S. Bad Apple, for moving kmem_alloc to a private place, and
removing it's symbol!!!
You can still get at it, if you are willing to link against the
Unsupported symbol set or the System.6.0 symbol set. But if you use
OSMalloc(), we'll have a descriptive tag so we know who to blame when
things go wrong. Of course, not everyone views that as a feature...
-- Terry
_______________________________________________
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