> > #define ADDRESS_SPACE_LIMIT ((void *)0xc0000000) /* top of the user address > space */ > > when making an anonymous mmap Solaris returns > 11: ptr = (void *) 0xdf620000 > > Q. Why is there a hard limit on this ? Is this a Windows thing or a Linux > thing.
It is actually a hardware feature, IIRC it is the address above which the cache ignores process contexts (cache colours). This means that kernel code/data is shared (in the cache) by all processes. For the sparc reference mmu (used by all sun sparc systems for many many years) the address is 0xe0000000. As someone put it 'the kernel has to shoehorn itself into only 512Mb' [1]. I suspect you want to make ADDRESS_SPACE_LIMIT architecture dependant. For non-x86 you can (presumably) use OS assigned mmap addresses throughout - or is the used of known mmap addresses pervasive? David (This first became a problem as memory sizes approached 512Mb and it no longer became possible to have all of physically memory mapped into kernel address space). -- David Laight: [EMAIL PROTECTED]