{"action":"created","issue":{"url":"https://api.github.com/repos/cockroachdb/c-rocksdb/issues/11","labels_url":"https://api.github.com/repos/cockroachdb/c-rocksdb/issues/11/labels{/name}","comments_url":"https://api.github.com/repos/cockroachdb/c-rocksdb/issues/11/comments","events_url":"https://api.github.com/repos/cockroachdb/c-rocksdb/issues/11/events","html_url":"https://github.com/cockroachdb/c-rocksdb/pull/11","id":114511870,"number":11,"title":"link in jemalloc","user":{"login":"tamird","id":1535036,"avatar_url":"https://avatars.githubusercontent.com/u/1535036?v=3","gravatar_id":"","url":"https://api.github.com/users/tamird","html_url":"https://github.com/tamird","followers_url":"https://api.github.com/users/tamird/followers","following_url":"https://api.github.com/users/tamird/following{/other_user}","gists_url":"https://api.github.com/users/tamird/gists{/gist_id}","starred_url":"https://api.github.com/users/tamird/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tamird/subscriptions","organizations_url":"https://api.github.com/users/tamird/orgs","repos_url":"https://api.github.com/users/tamird/repos","events_url":"https://api.github.com/users/tamird/events{/privacy}","received_events_url":"https://api.github.com/users/tamird/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-11-02T02:21:15Z","updated_at":"2015-11-03T02:19:15Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/cockroachdb/c-rocksdb/pulls/11","html_url":"https://github.com/cockroachdb/c-rocksdb/pull/11","diff_url":"https://github.com/cockroachdb/c-rocksdb/pull/11.diff","patch_url":"https://github.com/cockroachdb/c-rocksdb/pull/11.patch"},"body":"I tested this in the main cockroach binary by printing the stats at exit:\r\n```diff\r\ndiff --git a/main.go b/main.go\r\nindex 0c22b74..fd51773 100644\r\n--- a/main.go\r\n+++ b/main.go\r\n@@ -24,10 +24,19 @@ import (\r\n \t\"math/rand\"\r\n \t\"os\"\r\n \r\n+\t_ \"github.com/cockroachdb/c-jemalloc\"\r\n+\r\n \t\"github.com/cockroachdb/cockroach/cli\"\r\n \t\"github.com/cockroachdb/cockroach/util/randutil\"\r\n )\r\n \r\n+// #cgo CPPFLAGS: -I../c-jemalloc/internal/include\r\n+// #cgo darwin LDFLAGS: -Wl,-undefined -Wl,dynamic_lookup\r\n+// #cgo !darwin LDFLAGS: -Wl,-unresolved-symbols=ignore-all\r\n+//\r\n+// #include <jemalloc/jemalloc.h>\r\n+import \"C\"\r\n+\r\n func main() {\r\n \t// Seed the math/rand RNG from crypto/rand.\r\n \trand.Seed(randutil.NewPseudoSeed())\r\n@@ -39,4 +48,6 @@ func main() {\r\n \t\tfmt.Fprintf(os.Stderr, \"Failed running command %q: %v\\n\", os.Args[1:], err)\r\n \t\tos.Exit(1)\r\n \t}\r\n+\r\n+\tC.malloc_stats_print(nil, nil, nil)\r\n }\r\n```\r\n\r\nHere are some results from the client and server after a short SQL session: https://gist.github.com/tamird/4dcdc6713ce8fb590cb2"},"comment":{"url":"https://api.github.com/repos/cockroachdb/c-rocksdb/issues/comments/153218982","html_url":"https://github.com/cockroachdb/c-rocksdb/pull/11#issuecomment-153218982","issue_url":"https://api.github.com/repos/cockroachdb/c-rocksdb/issues/11","id":153218982,"user":{"login":"tamird","id":1535036,"avatar_url":"https://avatars.githubusercontent.com/u/1535036?v=3","gravatar_id":"","url":"https://api.github.com/users/tamird","html_url":"https://github.com/tamird","followers_url":"https://api.github.com/users/tamird/followers","following_url":"https://api.github.com/users/tamird/following{/other_user}","gists_url":"https://api.github.com/users/tamird/gists{/gist_id}","starred_url":"https://api.github.com/users/tamird/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tamird/subscriptions","organizations_url":"https://api.github.com/users/tamird/orgs","repos_url":"https://api.github.com/users/tamird/repos","events_url":"https://api.github.com/users/tamird/events{/privacy}","received_events_url":"https://api.github.com/users/tamird/received_events","type":"User","site_admin":false},"created_at":"2015-11-03T02:19:15Z","updated_at":"2015-11-03T02:19:15Z","body":"Yep, got that a number of times too. Seems to be an intermittent issue."}}