Created
August 24, 2012 02:53
-
-
Save daniel-j-h/3444985 to your computer and use it in GitHub Desktop.
counting_bloom_add segfaults
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stddef.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include "dablooms.h" | |
int main() { | |
counting_bloom_t* bloom = NULL; | |
bloom = new_counting_bloom(1000, 0.05, "bloom.bin"); | |
if(bloom == NULL) { | |
fprintf(stderr, "bloom init error\n"); | |
exit(EXIT_FAILURE); | |
} | |
const char* item = "test"; | |
// XXX | |
counting_bloom_add(bloom, item, strlen(item)); | |
free_counting_bloom(bloom); | |
return EXIT_SUCCESS; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment