Skip to content

Commit

Permalink
Argon2 format: Re-order thread_mem[] struct fields
Browse files Browse the repository at this point in the history
What requires greater alignment goes first.  This change currently
reduces the struct from 72 to 64 bytes.
  • Loading branch information
solardiz committed Nov 9, 2024
1 parent a2bcd19 commit 8c7d3e7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/argon2_fmt_plug.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,9 @@ struct argon2_salt {
};

struct argon2_memory {
int used;
region_t region;
char padding[MEM_ALIGN_CACHE - sizeof(int) - sizeof(region_t)];
int used;
char padding[MEM_ALIGN_CACHE - sizeof(region_t) - sizeof(int)];
};

static struct argon2_salt saved_salt;
Expand Down

0 comments on commit 8c7d3e7

Please sign in to comment.