Mistake on this page?
Report an issue in GitHub or email us
wsf_heap.h
Go to the documentation of this file.
1 /*************************************************************************************************/
2 /*!
3  * \file wsf_heap.h
4  *
5  * \brief Buffer heap service.
6  *
7  * Copyright (c) 2018 Arm Ltd. All Rights Reserved.
8  *
9  * Copyright (c) 2019-2020 Packetcraft, Inc.
10  *
11  * Licensed under the Apache License, Version 2.0 (the "License");
12  * you may not use this file except in compliance with the License.
13  * You may obtain a copy of the License at
14  *
15  * http://www.apache.org/licenses/LICENSE-2.0
16  *
17  * Unless required by applicable law or agreed to in writing, software
18  * distributed under the License is distributed on an "AS IS" BASIS,
19  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20  * See the License for the specific language governing permissions and
21  * limitations under the License.
22  */
23 /*************************************************************************************************/
24 #ifndef WSF_HEAP_H
25 #define WSF_HEAP_H
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
31 /*! \addtogroup WSF_HEAP_API
32  * \{ */
33 
34 /*************************************************************************************************/
35 /*!
36  * \brief Get heap available.
37  *
38  * \return Number of bytes of heap memory available.
39  */
40 /*************************************************************************************************/
41 uint32_t WsfHeapCountAvailable(void);
42 
43 /*************************************************************************************************/
44 /*!
45  * \brief Get heap used.
46  *
47  * \return Number of bytes of heap memory used.
48  */
49 /*************************************************************************************************/
50 uint32_t WsfHeapCountUsed(void);
51 
52 /*************************************************************************************************/
53 /*!
54  * \brief Reserve heap memory.
55  *
56  * \param size Number of bytes of heap memory used.
57  */
58 /*************************************************************************************************/
59 void WsfHeapAlloc(uint32_t size);
60 
61 /*************************************************************************************************/
62 /*!
63  * \brief Get next available heap memory.
64  *
65  * \return Address of the start of heap memory.
66  */
67 /*************************************************************************************************/
68 void *WsfHeapGetFreeStartAddress(void);
69 
70 /*! \} */ /* WSF_HEAP_API */
71 
72 #ifdef __cplusplus
73 };
74 #endif
75 
76 #endif /* WSF_HEAP_H */
77 
void WsfHeapAlloc(uint32_t size)
Reserve heap memory.
void * WsfHeapGetFreeStartAddress(void)
Get next available heap memory.
uint32_t WsfHeapCountUsed(void)
Get heap used.
uint32_t WsfHeapCountAvailable(void)
Get heap available.
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.