A nommu system hasn't got virtual address, any "mappings" are just the kernel keeping track of what physical memory is allocated and what's free. Instead allocations on nommu must locate a contiguous region of physical memory, memset it to zero, and return a pointer to the start of it. This means malloc() will return NULL if it can't find a sufficiently large contiguous chunk of memory.
This means that large speculative mappings, such as megabytes of stack "just in case", are a bad idea on nommu.
NoMu系统没有虚拟地址,任何“映射”只是跟踪物理内存分配和什么免费的内核。相反,NoMMU上的分配必须找到物理内存的邻接区域,将MSESET设置为零,并返回指向其开始的指针。这意味着如果无法找到足够大的连续内存块,则MalCube()将返回null。
这意味着大型投机映射,如“兆”的“兆”,对NoMMU来说是一个坏主意。 |