Fix comment.

It stores the pointer, not an offset (that would be an alternative approach).
This commit is contained in:
Bart Oldeman 2022-10-20 20:11:09 -04:00
parent 9959a60873
commit 9e6b060bf3
1 changed files with 3 additions and 3 deletions

View File

@ -75,9 +75,9 @@ static void *huge_malloc(BLASLONG size){
#endif #endif
/* Benchmarks should allocate with cacheline (often 64 bytes) alignment /* Benchmarks should allocate with cacheline (often 64 bytes) alignment
to avoid unreliable results. This technique, storing the offset in the to avoid unreliable results. This technique, storing the allocated
byte before the pointer, doesn't require C11's aligned_alloc for pointer value just before the aligned memory, doesn't require
compatibility with older compilers. */ C11's aligned_alloc for compatibility with older compilers. */
static void *aligned_alloc_cacheline(size_t n) static void *aligned_alloc_cacheline(size_t n)
{ {
void *p = malloc((size_t)(void *) + n + L1_DATA_LINESIZE - 1); void *p = malloc((size_t)(void *) + n + L1_DATA_LINESIZE - 1);