Fixed nedmalloc linking, added Memory class