Skip to content

Commit

Permalink
use stdlib alligned alloc
Browse files Browse the repository at this point in the history
  • Loading branch information
hariharan-devarajan committed Dec 4, 2023
1 parent 0b70ef8 commit cc2f91e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/utils/read_all.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ ssize_t read_all (const char* filename, void **bufp)
errno = EINVAL;
return -1;
}
*bufp = allocate_aligned (file_size);
size_t alignment = getpagesize();
*bufp = aligned_alloc(alignment, file_size); //allocate_aligned (file_size);
if (*bufp == NULL) {
errno = EINVAL;
return -1;
Expand Down

0 comments on commit cc2f91e

Please sign in to comment.