mirror of
https://github.com/ipxe/ipxe
synced 2025-12-18 02:20:19 +03:00
Rename e{malloc,realloc,free} to u{malloc,realloc,free}, to more obviously
reflect the fact that they allocate and deallocate user memory (i.e. things reached through a userptr_t).
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
#include <vsprintf.h>
|
||||
#include <gpxe/uaccess.h>
|
||||
#include <gpxe/emalloc.h>
|
||||
#include <gpxe/umalloc.h>
|
||||
#include <gpxe/memmap.h>
|
||||
|
||||
void emalloc_test ( void ) {
|
||||
void umalloc_test ( void ) {
|
||||
struct memory_map memmap;
|
||||
userptr_t bob;
|
||||
userptr_t fred;
|
||||
@@ -11,15 +11,15 @@ void emalloc_test ( void ) {
|
||||
printf ( "Before allocation:\n" );
|
||||
get_memmap ( &memmap );
|
||||
|
||||
bob = emalloc ( 1234 );
|
||||
bob = erealloc ( bob, 12345 );
|
||||
fred = emalloc ( 999 );
|
||||
bob = ymalloc ( 1234 );
|
||||
bob = yrealloc ( bob, 12345 );
|
||||
fred = ymalloc ( 999 );
|
||||
|
||||
printf ( "After allocation:\n" );
|
||||
get_memmap ( &memmap );
|
||||
|
||||
efree ( bob );
|
||||
efree ( fred );
|
||||
ufree ( bob );
|
||||
ufree ( fred );
|
||||
|
||||
printf ( "After freeing:\n" );
|
||||
get_memmap ( &memmap );
|
||||
Reference in New Issue
Block a user