The real deal y0

  • 1 Post
  • 78 Comments
Joined 2 years ago
cake
Cake day: July 16th, 2023

help-circle







  • Cache man, its a fun thing. 32k 32 (derp, 32 not 32k) is a common cache line size. Some compilers realise that your data might be hit often and aligns it to a cache line start to make its access fast and easy. So yes, it might allocate more memory than it should need, but then its to align the data to something like a cache line.
    There is also a hardware reasons that might also be the case. I know the wii’s main processor communicates with the co processor over memory locations that should be 32k aligned because of access speed, not only because of cache. Sometimes, more is less :')

    Hell, might even be a cause of instruction speed that loading and handling 32k of data might be faster than a single byte :').

    Then there is also the minimum heap allocation size that might factor in. Though a 32k minimum memory block seems… Excessive xD