summaryrefslogtreecommitdiffstats
path: root/src/tests/emalloc_test.c
diff options
context:
space:
mode:
authorMichael Brown2007-01-16 09:36:42 +0100
committerMichael Brown2007-01-16 09:36:42 +0100
commit544fa259287a2b919d8ed05bc201a5133032ef05 (patch)
treeff78f4abbfb22c10f45402f98c11e2d5419f5e70 /src/tests/emalloc_test.c
parentCreate and use async_block() macro; it cuts down on the visual overhead (diff)
downloadipxe-544fa259287a2b919d8ed05bc201a5133032ef05.tar.gz
ipxe-544fa259287a2b919d8ed05bc201a5133032ef05.tar.xz
ipxe-544fa259287a2b919d8ed05bc201a5133032ef05.zip
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).
Diffstat (limited to 'src/tests/emalloc_test.c')
-rw-r--r--src/tests/emalloc_test.c26
1 files changed, 0 insertions, 26 deletions
diff --git a/src/tests/emalloc_test.c b/src/tests/emalloc_test.c
deleted file mode 100644
index e8428f5d5..000000000
--- a/src/tests/emalloc_test.c
+++ /dev/null
@@ -1,26 +0,0 @@
-#include <vsprintf.h>
-#include <gpxe/uaccess.h>
-#include <gpxe/emalloc.h>
-#include <gpxe/memmap.h>
-
-void emalloc_test ( void ) {
- struct memory_map memmap;
- userptr_t bob;
- userptr_t fred;
-
- printf ( "Before allocation:\n" );
- get_memmap ( &memmap );
-
- bob = emalloc ( 1234 );
- bob = erealloc ( bob, 12345 );
- fred = emalloc ( 999 );
-
- printf ( "After allocation:\n" );
- get_memmap ( &memmap );
-
- efree ( bob );
- efree ( fred );
-
- printf ( "After freeing:\n" );
- get_memmap ( &memmap );
-}