diff --git a/core/main.c b/core/main.c index 92d56d3..90276f3 100644 --- a/core/main.c +++ b/core/main.c @@ -42,7 +42,7 @@ void idleThread(void *arg) #define FILE_HEADER_SIZE 16 -#define FILE_MAX_SIZE 64 +#define FILE_MAX_SIZE 64 // In nb of sectors void loadUserSpace() { struct ata_partition *part = ATAGetPartition(0); @@ -52,7 +52,7 @@ void loadUserSpace() return; } - char *buf = malloc(FILE_MAX_SIZE * 512); + char *buf = malloc(FILE_MAX_SIZE * DISK_SECTOR_SIZE); if (buf == NULL) { printf("ENOMEM\n"); return;