#include #include void desallocation(void* ptr) { if (ptr != NULL) { printf("Desallocation a l'adresse : %p\n", ptr); free(ptr); } else { printf("Attention, tentative de desallocation de NULL"); } } void main(void) { size_t taille = 500000; int* ptr = (int*) calloc(taille, sizeof(int)); if (ptr == NULL) { printf("Allocation avortee\n"); } else { printf("Allocation reussie a l'adresse : %p\n", ptr); } desallocation(ptr); ptr = NULL; }