1126274Sdes/* SPDX-License-Identifier: GPL-2.0+ */
298937Sdes/*
398937Sdes * Sandbox access to system malloc (i.e. not U-Boot's)
498937Sdes *
598937Sdes * Copyright 2020 Google LLC
698937Sdes */
798937Sdes
898937Sdes#ifndef __ASM_MALLOC_H
998937Sdes#define __ASM_MALLOC_H
1098937Sdes
1198937Sdesvoid *malloc(size_t size);
1298937Sdesvoid free(void *ptr);
1398937Sdesvoid *calloc(size_t nmemb, size_t size);
1498937Sdesvoid *realloc(void *ptr, size_t size);
1598937Sdesvoid *reallocarray(void *ptr, size_t nmemb, size_t size);
1698937Sdes
1798937Sdes/*
1898937Sdes * This header allows calling the system allocation routines. It makes no
1998937Sdes * sense to also include U-Boot's malloc.h since that redfines malloc to
2098937Sdes * have a 'dl' prefix. These two implementations cannot be mixed and matched
2198937Sdes * in the same file.
2298937Sdes */
2398937Sdes#ifdef __MALLOC_H__
2498937Sdes#error "This sandbox header file cannot be included with malloc.h"
2598937Sdes#endif
2698937Sdes
2798937Sdes#endif
2898937Sdes