- 论坛徽章:
- 0
|
看了一下代码,貌似kmalloc并不能支持高端内存。虽然没有发现有什么地方直接去检查GFP_HIGHUSER,但是里面是把alloc_pages得到的page,通过page_address来得到虚拟地址。对于从高端内存分配的page来说,page_address返回0。这应该就相当于分配失败了……
ULK3里面也有这么一段(8.2.5):
Notice that it is not possible to allocate page frames from the ZONE_HIGHMEM memory zone, because the kmem_getpages( ) function returns the linear address yielded by the page_address( ) function; as explained in the section "Kernel Mappings of High-Memory Page Frames" earlier in this chapter, this function returns NULL for unmapped high-memory page frames. |
|