uboot/arch/sandbox/include/asm/malloc.h
<<
>>
Prefs
   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
  10void *malloc(size_t size);
  11void free(void *ptr);
  12void *calloc(size_t nmemb, size_t size);
  13void *realloc(void *ptr, size_t size);
  14void *reallocarray(void *ptr, size_t nmemb, size_t size);
  15
  16/*
  17 * This header allows calling the system allocation routines. It makes no
  18 * sense to also include U-Boot's malloc.h since that redfines malloc to
  19 * have a 'dl' prefix. These two implementations cannot be mixed and matched
  20 * in the same file.
  21 */
  22#ifdef __MALLOC_H__
  23#error "This sandbox header file cannot be included with malloc.h"
  24#endif
  25
  26#endif
  27