aboutsummaryrefslogtreecommitdiffstats
path: root/com32/elflink
diff options
context:
space:
mode:
authorFeng Tang <feng.tang@intel.com>2010-06-28 15:14:37 +0800
committerFeng Tang <feng.tang@intel.com>2010-07-20 11:10:04 +0800
commit387d33fbfcdbe2d039ba719d487359b205181873 (patch)
tree51a6cca06e34eb1a2904c4650ce330aabcf6294e /com32/elflink
parent7badd550c3823c6772f36ecaeade2b57538b6e46 (diff)
downloadsyslinux-387d33fbfcdbe2d039ba719d487359b205181873.tar.gz
syslinux-387d33fbfcdbe2d039ba719d487359b205181873.tar.xz
syslinux-387d33fbfcdbe2d039ba719d487359b205181873.zip
elflink: malloc cleanup
* remove com32/lib/malloc.h * remove com32/elflink/test_memalign.c
Diffstat (limited to 'com32/elflink')
-rw-r--r--com32/elflink/Makefile3
-rw-r--r--com32/elflink/test_memalign.c48
2 files changed, 1 insertions, 50 deletions
diff --git a/com32/elflink/Makefile b/com32/elflink/Makefile
index 9e6cc4af..39266ded 100644
--- a/com32/elflink/Makefile
+++ b/com32/elflink/Makefile
@@ -13,8 +13,7 @@
topdir = ../..
include ../MCONFIG
-MODULES = test_memalign.c32 # test_com32.c32
-
+MODULES =
TESTFILES =
all: $(MODULES) $(TESTFILES)
diff --git a/com32/elflink/test_memalign.c b/com32/elflink/test_memalign.c
deleted file mode 100644
index 1bd5ba5d..00000000
--- a/com32/elflink/test_memalign.c
+++ /dev/null
@@ -1,48 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <console.h>
-#include <errno.h>
-
-void perform_allocation(size_t align)
-{
- int res = 0;
- int size = 100;
- void *ptr;
-
- printf("Allocation aligned at %#zx bytes: ", align);
- res = posix_memalign(&ptr, align, size);
-
- switch (res) {
- case 0:
- printf("address %p\n", ptr);
- break;
- case EINVAL:
- printf("EINVAL\n");
- break;
- case ENOMEM:
- printf("ENOMEM\n");
- break;
- }
-}
-
-int main(void)
-{
- size_t align = 0x10000;
-
- // Open a standard r/w console
- openconsole(&dev_stdcon_r, &dev_stdcon_w);
-
- while (align >= sizeof(void *)) {
- perform_allocation(align);
- align /= 2;
- }
-
- printf("\n");
-
- while (align <= 0x10000) {
- perform_allocation(align);
- align *= 2;
- }
-
- return 0;
-}