sandbox: Support unmapping a file

Add the opposite of mapping, so that we can unmap and avoid running out of
address space.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass 2021-10-23 17:25:58 -06:00
parent 15156c95e9
commit a0ff280a89
2 changed files with 19 additions and 0 deletions

View file

@ -419,6 +419,15 @@ int os_read_file(const char *name, void **bufp, int *sizep);
*/
int os_map_file(const char *pathname, int os_flags, void **bufp, int *sizep);
/**
* os_unmap() - Unmap a file previously mapped
*
* @buf: Mapped address
* @size: Size in bytes
* Return: 0 if OK, -ve on error
*/
int os_unmap(void *buf, int size);
/*
* os_find_text_base() - Find the text section in this running process
*