Oliver Yang wrote:
Garrett D'Amore wrote:
Oliver Yang wrote:
Hi Guys,

If I use kmem_alloc to alloc a buffer less than 4K, can it ensure that buffer doesn't cross the page boundary(4k on x86)?

It probably won't cross a page boundary, but the DDI does not guarantee this.

If you want to provide guarantees like this, use ddi_dma_mem_alloc() with attributes that specify that page boundaries should not be crossed.

Yes, I knew. On the man page of kmem_alloc, it just ensures memory is at least double-word aligned, and no other guarantees.

But I really want to know whether current implementation of kmem_alloc or slab can guarantees this, if the request alloc size is less than 4k.
Since not only one guys told me, that is true.

1) so read the source.

2) why do you "really want" to know this? knowing it is useless, as it is *not guaranteed*, which means it can change at any time.
_______________________________________________
opensolaris-code mailing list
opensolaris-code@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to