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 committed Nov 27, 2023
1 parent f1e943b commit 8d10e49
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 8d10e49

Please sign in to comment.