From b998ae0611fc9abb6b093209a6c67aeb833e46ad Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Wed, 14 Jul 2004 12:27:03 +0000 Subject: Based on a patch from Alexandre Oliva, make sure _dl_malloc returns a nicely aligned pointer that may be aligned up to page_size. Also add _dl_free, --- ldso/ldso/dl-hash.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ldso/ldso/dl-hash.c') diff --git a/ldso/ldso/dl-hash.c b/ldso/ldso/dl-hash.c index 251ab6466..c6d4f1233 100644 --- a/ldso/ldso/dl-hash.c +++ b/ldso/ldso/dl-hash.c @@ -100,13 +100,13 @@ struct elf_resolve *_dl_add_elf_hash_table(const char *libname, int i; if (!_dl_loaded_modules) { - tpnt = _dl_loaded_modules = (struct elf_resolve *) _dl_malloc(sizeof(struct elf_resolve)); + tpnt = _dl_loaded_modules = (struct elf_resolve *) _dl_malloc_function(sizeof(struct elf_resolve)); _dl_memset(tpnt, 0, sizeof(struct elf_resolve)); } else { tpnt = _dl_loaded_modules; while (tpnt->next) tpnt = tpnt->next; - tpnt->next = (struct elf_resolve *) _dl_malloc(sizeof(struct elf_resolve)); + tpnt->next = (struct elf_resolve *) _dl_malloc_function(sizeof(struct elf_resolve)); _dl_memset(tpnt->next, 0, sizeof(struct elf_resolve)); tpnt->next->prev = tpnt; tpnt = tpnt->next; -- cgit v1.2.3