cr suggestions

This commit is contained in:
TL
2025-02-12 16:41:34 +08:00
committed by Marcin Kolny
parent dfcadc6202
commit 2e4ebfb20a
3 changed files with 25 additions and 11 deletions

View File

@ -149,8 +149,10 @@ os_mmap(void *hint, size_t size, int prot, int flags, os_file_handle file)
page_size = getpagesize();
aligned_size = (size + page_size - 1) & ~(page_size - 1);
if (aligned_size >= UINT32_MAX)
if (aligned_size >= UINT32_MAX) {
os_printf("mmap failed: request size overflow due to paging\n");
return NULL;
}
ret = sgx_alloc_rsrv_mem(aligned_size);
if (ret == NULL) {
@ -214,8 +216,10 @@ os_mprotect(void *addr, size_t size, int prot)
void
os_dcache_flush(void)
{}
{
}
void
os_icache_flush(void *start, size_t len)
{}
{
}