==> include/mesh/abi/view_heap.h <==1/* @ajax/mesh-abi-view-heap: The view heap: whole pages meshd allocates to program views.
2 *
3 * Part of alpha-c-mesh, a C port of alpha-rust-mesh (README.md says from where). */
4#ifndef MESH_ABI_VIEW_HEAP_H
5#define MESH_ABI_VIEW_HEAP_H
6
7#include <stdbool.h>
8#include <stddef.h>
9#include <stdint.h>
10#include "mesh/abi/base.h"
11
12#define MESH_VIEW_HEAP 0x100000
13#define MESH_VIEW_HEAP_END (MESH_MAILBOX_BYTES)
14#define MESH_VIEW_PAGE 0x1000
15#define MESH_VIEW_PAGES ((MESH_VIEW_HEAP_END - MESH_VIEW_HEAP) / MESH_VIEW_PAGE)
16
17/* The Rust const asserts that only involve this package. */
18_Static_assert((MESH_VIEW_HEAP % MESH_VIEW_PAGE == 0), "VIEW_HEAP.is_multiple_of(VIEW_PAGE)");
19_Static_assert(MESH_VIEW_PAGES == 0x700, "VIEW_PAGES == 0x700");
20
21#endif