Thankyou both Sivan and Superku

@Superku:
when you first stated the size of the array was the problem I though you meant using too much, as in, more than 2GB due to a memory leack in my code, or recursive functions since you mentioned them. I didnt understand the engine had problems allocating "relatively" small amounts of memory even if I had it available. Sorry for the confusion.

@Sivan:
Thankyou very much for that code, up until now I had only used malloc for structs (linked lists). Your example will save me time and headaches getting around to learning to use it with arrays. Thanks!

EDIT:
I am still curious though. Do short and char properly use 2B and 1B respectively? Or do they use 4B like bool?

Last edited by Carlos3DGS; 02/05/13 15:08.

"The more you know, the more you realize how little you know..."

I <3 HORUS
http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=401929&page=1