Also, I want to rename min_addr to default_addr, which I contend better reflects what it represents. The min_addr is not a minimum address in the same way that max_addr is actually a maximum address that can be allocated. For example, a non-zero hint can be less than min_addr and be allocated.
Details
Details
Diff Detail
Diff Detail
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
sys/vm/vm_mmap.c | ||
---|---|---|
1638 | Should we try to avoid the unnecessary calculation when MAP_32BIT is set? #ifdef MAP_32BIT if ((flags & MAP_32BIT) != 0) default_addr = 0; else #endif default_addr = round_page(... |
sys/vm/vm_mmap.c | ||
---|---|---|
1638 | My assumption is that MAP_32BIT is rarely used. Handling MAP_32BIT in this way leads the compiler to generate a conditional move instruction rather than a conditional branch. |
sys/vm/vm_mmap.c | ||
---|---|---|
1633 | Yes, it is. vm_daddr_t is a caddr_t. The implementation of round_page() is machine-dependent. On some architectures, it internally casts its argument to an unsigned long. On the other architectures, where it doesn't have that internal cast, there will be a compilation error. |