{"action":"created","issue":{"url":"https://api.github.com/repos/jemalloc/jemalloc/issues/298","labels_url":"https://api.github.com/repos/jemalloc/jemalloc/issues/298/labels{/name}","comments_url":"https://api.github.com/repos/jemalloc/jemalloc/issues/298/comments","events_url":"https://api.github.com/repos/jemalloc/jemalloc/issues/298/events","html_url":"https://github.com/jemalloc/jemalloc/issues/298","id":115677925,"number":298,"title":"sized realloc","user":{"login":"stepancheg","id":28969,"avatar_url":"https://avatars.githubusercontent.com/u/28969?v=3","gravatar_id":"","url":"https://api.github.com/users/stepancheg","html_url":"https://github.com/stepancheg","followers_url":"https://api.github.com/users/stepancheg/followers","following_url":"https://api.github.com/users/stepancheg/following{/other_user}","gists_url":"https://api.github.com/users/stepancheg/gists{/gist_id}","starred_url":"https://api.github.com/users/stepancheg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stepancheg/subscriptions","organizations_url":"https://api.github.com/users/stepancheg/orgs","repos_url":"https://api.github.com/users/stepancheg/repos","events_url":"https://api.github.com/users/stepancheg/events{/privacy}","received_events_url":"https://api.github.com/users/stepancheg/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-11-07T17:07:29Z","updated_at":"2015-11-13T00:54:44Z","closed_at":null,"body":"AFAIU, there are no\r\n* sized realloc function\r\n* realloc function which accepts a parameter with amount of used data to memcpy (when 2M allocated, and only 1M is used, and reallocating to 3M, no need to copy whole 2M inside jemalloc).\r\n\r\nSo, requesting a function like:\r\n\r\n```\r\nvoid* je_srallocx(void *ptr, size_t old_size, size_t used_size, size_t size, int flags);\r\n```\r\n\r\n* `old_size` parameter can be used to avoid call to `isalloc`\r\n* `used_size` is a parameter to be passed to `memcpy` (in the most cases it will be equal to `old_size`)"},"comment":{"url":"https://api.github.com/repos/jemalloc/jemalloc/issues/comments/156284457","html_url":"https://github.com/jemalloc/jemalloc/issues/298#issuecomment-156284457","issue_url":"https://api.github.com/repos/jemalloc/jemalloc/issues/298","id":156284457,"user":{"login":"stepancheg","id":28969,"avatar_url":"https://avatars.githubusercontent.com/u/28969?v=3","gravatar_id":"","url":"https://api.github.com/users/stepancheg","html_url":"https://github.com/stepancheg","followers_url":"https://api.github.com/users/stepancheg/followers","following_url":"https://api.github.com/users/stepancheg/following{/other_user}","gists_url":"https://api.github.com/users/stepancheg/gists{/gist_id}","starred_url":"https://api.github.com/users/stepancheg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stepancheg/subscriptions","organizations_url":"https://api.github.com/users/stepancheg/orgs","repos_url":"https://api.github.com/users/stepancheg/repos","events_url":"https://api.github.com/users/stepancheg/events{/privacy}","received_events_url":"https://api.github.com/users/stepancheg/received_events","type":"User","site_admin":false},"created_at":"2015-11-13T00:54:44Z","updated_at":"2015-11-13T00:54:44Z","body":"Actually, 5% is a speedup of a whole test. Speedup of realloc should be about 10%."}}