Added 8-6 impl, rewriting calloc with malloc (and memset)