Re: kmem_alloc replacement in Tiger
site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com 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 (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.a... This email sent to site_archiver@lists.apple.com
participants (1)
-
Andrew Gallatin