Allocate methods list using malloc, in case there are many methods