X-Git-Url: http://git.nguyen.vg/gitweb/?a=blobdiff_plain;f=src%2FOCamlDriver.cpp;h=7cf70c5a57f8908e1d7dc709d9fae52cd9504e4e;hb=960e4daabcffa00ab73a9b0edb7366f16df284ba;hp=146a0dfbc878bf9ff5458736ca250c6fad411ddc;hpb=be15ae2e9a7f0a1d7dade338529c2f9f207990bb;p=SXSI%2Fxpathcomp.git diff --git a/src/OCamlDriver.cpp b/src/OCamlDriver.cpp index 146a0df..7cf70c5 100644 --- a/src/OCamlDriver.cpp +++ b/src/OCamlDriver.cpp @@ -1070,7 +1070,6 @@ extern "C" value caml_bitmap_resize(value bitmap, value nsize) 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"); @@ -1148,7 +1147,6 @@ extern "C" value caml_bp_save(value b, value file) 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"); @@ -1157,3 +1155,8 @@ extern "C" value caml_bp_save(value b, value file) CAMLreturn(Val_unit); } +extern "C" value caml_bp_alloc_stats(value unit) +{ + CAMLparam1(unit); + CAMLreturn (Val_long(bp_get_alloc_stats())); +}