From a2cd6ef5517839677e82f4c55416e8e482efebdb Mon Sep 17 00:00:00 2001 From: augustin64 Date: Thu, 25 May 2023 10:40:19 +0200 Subject: [PATCH] change comments --- src/cnn/include/cnn.h | 2 ++ src/cnn/neuron_io.c | 2 +- src/common/include/memory_management.h | 13 ++++++++----- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/cnn/include/cnn.h b/src/cnn/include/cnn.h index 2779e21..86c69b1 100644 --- a/src/cnn/include/cnn.h +++ b/src/cnn/include/cnn.h @@ -1,3 +1,5 @@ +#include + #include "struct.h" #ifndef DEF_MAIN_H diff --git a/src/cnn/neuron_io.c b/src/cnn/neuron_io.c index d961b2e..bd5f30c 100644 --- a/src/cnn/neuron_io.c +++ b/src/cnn/neuron_io.c @@ -173,7 +173,7 @@ Network* read_network(char* filename) { printf_error((char*)"Incorrect magic number !\n"); if (INITIAL_MAGIC_NUMBER < magic && magic >= INITIAL_MAGIC_NUMBER) { printf("\tThis backup is no longer supported\n"); - printf("\tnPlease update it manually or re-train the network.\n"); + printf("\tPlease update it manually or re-train the network.\n"); printf("\t(You can update it with a script or manually with a Hex Editor)\n"); } exit(1); diff --git a/src/common/include/memory_management.h b/src/common/include/memory_management.h index 40032d1..17e3878 100644 --- a/src/common/include/memory_management.h +++ b/src/common/include/memory_management.h @@ -14,13 +14,16 @@ // L'initialisation passe de 1h02 à 2.4s sur mon matériel #define MEMORY_TAIL_OPT -// We define our memory with a linked list of memory blocks +// Liste chaînée de blocs de mémoire typedef struct Memory { - void* start; // Start of the allocated memory - void* cursor; // Current cursor + void* start; // Début du bloc de mémoire alloué + void* cursor; // Curseur actuel + size_t size; // Taille de la mémoire allouée - int nb_alloc; // Nombre d'allocations dans le bloc - unsigned int id; // Nombre aléatoire permettant d'identifier le bloc plus facilement lors du débogage + int nb_alloc; // Nombre d'allocations actives dans le bloc + + unsigned int id; // Nombre aléatoire permettant d'identifier le bloc + // plus facilement lors du débogage struct Memory* next; // Élément suivant } Memory;