Skip to content

Instantly share code, notes, and snippets.

@OlegRomanenko
Last active September 12, 2015 10:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save OlegRomanenko/a4bf96a8fa9b744a2870 to your computer and use it in GitHub Desktop.
Save OlegRomanenko/a4bf96a8fa9b744a2870 to your computer and use it in GitHub Desktop.
as_key_new_digest_memory_leak
#include <cstdio>
#include <aerospike/aerospike.h>
#include <aerospike/aerospike_key.h>
int main(int argc, char** argv)
{
as_digest_value digest = {0};
for (size_t i = 0; i < 10000000; i++) {
as_key* key = as_key_new_digest("ns", "set", digest);
as_key_destroy(key);
}
getchar();
return EXIT_SUCCESS;
}
@OlegRomanenko
Copy link
Author

Eat ~1.8Gb of RAM on x86_64 Ubuntu 12.04
Lib: aerospike-client-c-devel-3.1.22.ubuntu12.04.x86_64

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment