1 /* 2 * Copyright 2012-2014 Intel Corporation - All Rights Reserved 3 */ 4 5 #include <mem/malloc.h> 6 #include <string.h> 7 #include "efi.h" 8 9 void *efi_malloc(size_t size, enum heap heap, malloc_tag_t tag) 10 { 11 return AllocatePool(size); 12 } 13 14 void *efi_realloc(void *ptr, size_t size) 15 { 16 void *newptr; 17 18 newptr = AllocatePool(size); 19 memcpy(newptr, ptr, size); 20 FreePool(ptr); 21 return newptr; 22 } 23 24 void efi_free(void *ptr) 25 { 26 FreePool(ptr); 27 } 28