iPXE
|
iPXE user memory allocation API for EFI More...
#include <string.h>
#include <errno.h>
#include <assert.h>
#include <ipxe/umalloc.h>
#include <ipxe/efi/efi.h>
Go to the source code of this file.
Macros | |
#define | UNOWHERE ( ~UNULL ) |
Equivalent of NOWHERE for user pointers. More... | |
Functions | |
FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
static userptr_t | efi_urealloc (userptr_t old_ptr, size_t new_size) |
Reallocate external memory. More... | |
PROVIDE_UMALLOC (efi, urealloc, efi_urealloc) | |
iPXE user memory allocation API for EFI
Definition in file efi_umalloc.c.
#define UNOWHERE ( ~UNULL ) |
Equivalent of NOWHERE for user pointers.
Definition at line 39 of file efi_umalloc.c.
FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
Reallocate external memory.
old_ptr | Memory previously allocated by umalloc(), or UNULL |
new_size | Requested size |
new_ptr | Allocated memory, or UNULL |
Calling realloc() with a new size of zero is a valid way to free a memory block.
Definition at line 51 of file efi_umalloc.c.
References AllocateAnyPages, EFI_BOOT_SERVICES::AllocatePages, assert(), EFI_SYSTEM_TABLE::BootServices, copy_from_user(), copy_to_user(), DBG, EEFI, EFI_PAGE_SIZE, EFI_SIZE_TO_PAGES, efi_systab, EfiBootServicesData, EFI_BOOT_SERVICES::FreePages, memcpy_user(), phys_to_user(), rc, strerror(), UNOWHERE, UNULL, and user_to_phys().
PROVIDE_UMALLOC | ( | efi | , |
urealloc | , | ||
efi_urealloc | |||
) |