A function should not be named "function", or else your code won't compile. But I think you'll also get a stack problem. The stack has limited size and is for local variables - large arrays should be global, or static, or allocated at runtime.