Skip to content

Commit 4885798

Browse files
niklarmmeriac
authored andcommitted
Use 8kB page size for the page heap
1 parent 2b418f4 commit 4885798

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

source/led2.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ static void led2_main(const void *)
3939
/* Deallocate alloc1 page, creating a hole. */
4040
secure_allocator_destroy(alloc);
4141
/* Allocate two pages. */
42-
alloc = secure_allocator_create_with_pages(uvisor_get_page_size() + 12*kB, 6*kB);
42+
alloc = secure_allocator_create_with_pages(uvisor_get_page_size() + 3*kB, 6*kB);
4343
/* Deallocate alloc2 page, creating another hole. */
4444
secure_allocator_destroy(alloc2);
4545

@@ -52,9 +52,9 @@ static void led2_main(const void *)
5252
alloc_fill_wait_verify_free(size, seed, 311);
5353

5454
/* Allocate in first page */
55-
specific_alloc_fill_wait_verify_free(alloc, 14*kB, seed, 0);
55+
specific_alloc_fill_wait_verify_free(alloc, 6*kB, seed, 0);
5656

5757
/* Allocate in second page */
58-
specific_alloc_fill_wait_verify_free(alloc, 14*kB, seed, 101);
58+
specific_alloc_fill_wait_verify_free(alloc, 6*kB, seed, 101);
5959
}
6060
}

source/main.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ UVISOR_SET_PRIV_SYS_IRQ_HOOKS(SVC_Handler, PendSV_Handler, SysTick_Handler);
3333

3434
/* Enable uVisor. */
3535
UVISOR_SET_MODE_ACL(UVISOR_ENABLED, g_main_acl);
36+
UVISOR_SET_PAGE_HEAP(8*1024, 5);
3637

3738
static void main_alloc(void)
3839
{

0 commit comments

Comments
 (0)