Google Cloud IoT device SDK for embedded C  1.0.2
iotc_bsp_mem.h
Go to the documentation of this file.
1 /* Copyright 2018-2020 Google LLC
2  *
3  * This is part of the Google Cloud IoT Device SDK for Embedded C.
4  * It is licensed under the BSD 3-Clause license; you may not use this file
5  * except in compliance with the License.
6  *
7  * You may obtain a copy of the License at:
8  * https://opensource.org/licenses/BSD-3-Clause
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef __IOTC_BSP_MEM_H__
18 #define __IOTC_BSP_MEM_H__
19 
28 #include <stddef.h>
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
39 void* iotc_bsp_mem_alloc(size_t byte_count);
40 
57 void* iotc_bsp_mem_realloc(void* ptr, size_t byte_count);
58 
64 void iotc_bsp_mem_free(void* ptr);
65 
66 #ifdef __cplusplus
67 }
68 #endif
69 
70 #endif /* __IOTC_BSP_MEM_H__ */
void * iotc_bsp_mem_realloc(void *ptr, size_t byte_count)
Changes the size of a memory block and returns a pointer to the reallocated block.
void iotc_bsp_mem_free(void *ptr)
Frees a block of memory.
void * iotc_bsp_mem_alloc(size_t byte_count)
Allocates memory and returns a pointer to the allocated block.