CAMLparam2(bitmap, nsize);
size_t bits = Long_val(nsize);
size_t bytes = (bits / (8 * sizeof(unsigned int)) + 1 ) * sizeof(unsigned int);
- fprintf(stderr, "Growing to: %lu bytes\n", (bits / (8 * sizeof(unsigned int)) + 1 ) * sizeof(unsigned int));
unsigned int * buffer = (unsigned int*) realloc((void *) bitmap, bytes);
if (buffer == NULL)
CAMLRAISEMSG("BP: cannot reallocate memory");
int f1 = Int_val(file);
int f2 = dup(f1);
FILE * fd = fdopen(f2, "a");
- fprintf(stderr, "Writing %i %p bytes\n", ((B->n+D-1)/D)*8, B );
fflush(stderr);
if (fd == NULL)
CAMLRAISEMSG("Error saving bp file");