{"action":"created","issue":{"url":"https://api.github.com/repos/acplt/open62541/issues/262","labels_url":"https://api.github.com/repos/acplt/open62541/issues/262/labels{/name}","comments_url":"https://api.github.com/repos/acplt/open62541/issues/262/comments","events_url":"https://api.github.com/repos/acplt/open62541/issues/262/events","html_url":"https://github.com/acplt/open62541/issues/262","id":86480356,"number":262,"title":"Message buffer not reused and instead allocated for each transaction","user":{"login":"pfpmeijers","id":8824711,"avatar_url":"https://avatars.githubusercontent.com/u/8824711?v=3","gravatar_id":"","url":"https://api.github.com/users/pfpmeijers","html_url":"https://github.com/pfpmeijers","followers_url":"https://api.github.com/users/pfpmeijers/followers","following_url":"https://api.github.com/users/pfpmeijers/following{/other_user}","gists_url":"https://api.github.com/users/pfpmeijers/gists{/gist_id}","starred_url":"https://api.github.com/users/pfpmeijers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pfpmeijers/subscriptions","organizations_url":"https://api.github.com/users/pfpmeijers/orgs","repos_url":"https://api.github.com/users/pfpmeijers/repos","events_url":"https://api.github.com/users/pfpmeijers/events{/privacy}","received_events_url":"https://api.github.com/users/pfpmeijers/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2015-06-09T06:53:52Z","updated_at":"2015-06-15T15:03:34Z","closed_at":null,"body":"For each transaction the message buffer looks to be allocated (and  freed afterwards) instead of being reused. Because the message buffer size is fixed (fixed maximum), it sounds more efficient to reuse the same memory block.\r\n\r\nSee e.g. valgrind output of a test doing multiple read transactions:\r\n==36267== \r\n==36267== HEAP SUMMARY:\r\n==36267==     in use at exit: 0 bytes in 0 blocks\r\n==36267==   total heap usage: 78,782 allocs, 78,782 frees, 1,114,503,121 bytes allocated\r\n==36267== \r\n==36267== All heap blocks were freed -- no leaks are possible\r\n==36267== \r\n==36267== For counts of detected and suppressed errors, rerun with: -v\r\n==36267== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)\r\nMore than 1 GB is allocated in total.\r\n"},"comment":{"url":"https://api.github.com/repos/acplt/open62541/issues/comments/112099435","html_url":"https://github.com/acplt/open62541/issues/262#issuecomment-112099435","issue_url":"https://api.github.com/repos/acplt/open62541/issues/262","id":112099435,"user":{"login":"Stasik0","id":469170,"avatar_url":"https://avatars.githubusercontent.com/u/469170?v=3","gravatar_id":"","url":"https://api.github.com/users/Stasik0","html_url":"https://github.com/Stasik0","followers_url":"https://api.github.com/users/Stasik0/followers","following_url":"https://api.github.com/users/Stasik0/following{/other_user}","gists_url":"https://api.github.com/users/Stasik0/gists{/gist_id}","starred_url":"https://api.github.com/users/Stasik0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Stasik0/subscriptions","organizations_url":"https://api.github.com/users/Stasik0/orgs","repos_url":"https://api.github.com/users/Stasik0/repos","events_url":"https://api.github.com/users/Stasik0/events{/privacy}","received_events_url":"https://api.github.com/users/Stasik0/received_events","type":"User","site_admin":false},"created_at":"2015-06-15T15:03:33Z","updated_at":"2015-06-15T15:03:33Z","body":"send us the code as plaintext by using a gist (https://gist.github.com/)... how do you compile on windows? VS or mingw"}}