Allocate proper amount of memory. Otherwise, we pass the end of a buffer,

thus having unpleasant warning. Was found by jemalloc redzone code.

Reviewed by:	rwatson
Approved by:	cognet (mentor)
This commit is contained in:
Wojciech A. Koszek 2006-03-06 22:31:25 +00:00
parent 858494e461
commit 283e3098bb

View file

@ -326,7 +326,7 @@ main(int argc, char *argv[])
* it is statically declared as an array of size 1, so we need to
* provide additional space.
*/
uzp_userspace_len = sizeof(struct uma_zone) + (mp_maxid - 1) *
uzp_userspace_len = sizeof(struct uma_zone) + mp_maxid *
sizeof(struct uma_cache);
uzp_userspace = malloc(uzp_userspace_len);
if (uzp_userspace == NULL)