Paolo 'Blaisorblade' Giarrusso | 23352fc | 2005-05-05 16:15:16 -0700 | [diff] [blame] | 1 | #include <linux/vmalloc.h> |
| 2 | #include <linux/moduleloader.h> |
| 3 | |
| 4 | /*Copied from i386 arch/i386/kernel/module.c */ |
| 5 | void *module_alloc(unsigned long size) |
| 6 | { |
| 7 | if (size == 0) |
| 8 | return NULL; |
| 9 | return vmalloc_exec(size); |
| 10 | } |
| 11 | |
| 12 | /* Free memory returned from module_alloc */ |
| 13 | void module_free(struct module *mod, void *module_region) |
| 14 | { |
| 15 | vfree(module_region); |
| 16 | /* FIXME: If module_region == mod->init_region, trim exception |
| 17 | table entries. */ |
| 18 | } |
| 19 | |