I read a little about optimizing cache misses and learned this stdlib function. It does some kind of memory alignment for optimization, but can someone help me explain what this function really does?
The main purpose of the function is to allocate a buffer aligned to the size of the page. This is rarely done for performance - usually because you need a buffer that is suitable for a device driver or direct access to hardware.
. . - char, short, int, long - ( ) : ( struct field) . . (, char a; int b; a, sizeof(char)-sizeof(int) , , b sizeof(b).)
, ""... ?
H/W- ( -PCI) N N . , " ".
, , . , - . , :
, . . , , . ( , .) , , , , , . malloc() , - , TLB . ( .)
. , , " ". . , - . DRAM/DDR 16 . (32 64 ), . ( ): , , , , . std::map< struct aaa *, void * >. struct aaa , , , ( ), . , . , . -, . , .
, . , . . Intel .