2005-05-06 01:15:16 +02:00
|
|
|
#include <linux/vmalloc.h>
|
|
|
|
#include <linux/moduleloader.h>
|
|
|
|
|
2008-02-05 07:31:20 +01:00
|
|
|
/* Copied from i386 arch/i386/kernel/module.c */
|
2005-05-06 01:15:16 +02:00
|
|
|
void *module_alloc(unsigned long size)
|
|
|
|
{
|
|
|
|
if (size == 0)
|
|
|
|
return NULL;
|
|
|
|
return vmalloc_exec(size);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Free memory returned from module_alloc */
|
|
|
|
void module_free(struct module *mod, void *module_region)
|
|
|
|
{
|
|
|
|
vfree(module_region);
|
2008-02-05 07:31:20 +01:00
|
|
|
/*
|
|
|
|
* FIXME: If module_region == mod->init_region, trim exception
|
|
|
|
* table entries.
|
|
|
|
*/
|
2005-05-06 01:15:16 +02:00
|
|
|
}
|
|
|
|
|