Skip to content

Commit

Permalink
test: extend VMH testing with an allocation
Browse files Browse the repository at this point in the history
Add calls to vmh_alloc() and vmh_free() for testing.

Signed-off-by: Guennadi Liakhovetski <[email protected]>
  • Loading branch information
lyakh authored and kv2019i committed Dec 8, 2023
1 parent c8ecb88 commit ee534b2
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions zephyr/test/vmh.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,16 @@ static int vmh_test(void)
if (!h)
return -ENOMEM;

char *buf = vmh_alloc(h, 1616);

if (!buf)
return -ENOMEM;

buf[0] = 0;
buf[1615] = 15;

vmh_free(h, buf);

return vmh_free_heap(h);
}

Expand Down

0 comments on commit ee534b2

Please sign in to comment.