1 /* SPDX-License-Identifier: GPL-2.0+ */ 2 /* 3 * Sandbox access to system malloc (i.e. not U-Boot's) 4 * 5 * Copyright 2020 Google LLC 6 */ 7 8 #ifndef __ASM_MALLOC_H 9 #define __ASM_MALLOC_H 10 11 void *malloc(size_t size); 12 void free(void *ptr); 13 void *calloc(size_t nmemb, size_t size); 14 void *realloc(void *ptr, size_t size); 15 void *reallocarray(void *ptr, size_t nmemb, size_t size); 16 17 /* 18 * This header allows calling the system allocation routines. It makes no 19 * sense to also include U-Boot's malloc.h since that redfines malloc to 20 * have a 'dl' prefix. These two implementations cannot be mixed and matched 21 * in the same file. 22 */ 23 #ifdef __MALLOC_H__ 24 #error "This sandbox header file cannot be included with malloc.h" 25 #endif 26 27 #endif 28