hi, I have a question about "MULTI_PAGE_ALIASING" in allocate_stack()

Xishi Qiu qiuxishi@huawei.com
Thu Dec 17 13:23:00 GMT 2015


allocate_stack()
	...
	  /* To avoid aliasing effects on a larger scale than pages we
	     adjust the allocated stack size if necessary.  This way
	     allocations directly following each other will not have
	     aliasing problems.  */
#if MULTI_PAGE_ALIASING != 0
	  if ((size % MULTI_PAGE_ALIASING) == 0)
	    size += pagesize_m1 + 1;
#endif
	...

I don't quite understand "aliasing problems", could you explain it?

If we don't alloc each stack on a aligned addr, will there be less
cache conflict?

Thanks,
Xishi Qiu



More information about the Libc-alpha mailing list