Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of mbed-os by
page_allocator.h
00001 /* 00002 * Copyright (c) 2016, ARM Limited, All Rights Reserved 00003 * SPDX-License-Identifier: Apache-2.0 00004 * 00005 * Licensed under the Apache License, Version 2.0 (the "License"); you may 00006 * not use this file except in compliance with the License. 00007 * You may obtain a copy of the License at 00008 * 00009 * http://www.apache.org/licenses/LICENSE-2.0 00010 * 00011 * Unless required by applicable law or agreed to in writing, software 00012 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 00013 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00014 * See the License for the specific language governing permissions and 00015 * limitations under the License. 00016 */ 00017 #ifndef __UVISOR_API_PAGE_ALLOCATOR_H__ 00018 #define __UVISOR_API_PAGE_ALLOCATOR_H__ 00019 00020 #include "api/inc/uvisor_exports.h" 00021 #include "api/inc/page_allocator_exports.h" 00022 #include <stdint.h> 00023 00024 /* Allocate a number of requested pages with the requested page size. 00025 * @param table.page_size[in] Must be equal to the current page size 00026 * @param table.page_count[in] The number of pages to be allocated 00027 * @param table.page_origins[out] Pointers to the page origins. The table must be large enough to hold page_count entries. 00028 * @returns Non-zero on failure with failure class `UVISOR_ERROR_CLASS_PAGE`. See `UVISOR_ERROR_PAGE_*`. 00029 */ 00030 UVISOR_EXTERN int uvisor_page_malloc(UvisorPageTable * const table); 00031 00032 /* Free the pages associated with the table, only if it passes validation. 00033 * @returns Non-zero on failure with failure class `UVISOR_ERROR_CLASS_PAGE`. See `UVISOR_ERROR_PAGE_*`. 00034 */ 00035 UVISOR_EXTERN int uvisor_page_free(const UvisorPageTable * const table); 00036 00037 /* @returns the active page size for one page. */ 00038 UVISOR_EXTERN uint32_t uvisor_get_page_size(void); 00039 00040 #endif /* __UVISOR_API_PAGE_ALLOCATOR_H__ */
Generated on Tue Jul 12 2022 13:16:03 by
