1. No, you're thinking too complicated. ^^ There are no pointers to memory areas in the array, just ints. Just use the code below "//REMOVE THE POINTERS". The code above it won't do no good. Also remember to set Bwater to NULL afterwards.

2. When using sys_malloc(!) the memory area allocated is automatically filled with zero bytes. Hence the int array would contain all zeros. Be aware that this is not true for malloc!

Also be careful concerning sys_malloc and free. This will be the direct road to hell. When you allocate with sys_malloc you have to use sys_free. When allocating with malloc you have to use free. Don't mix that!


Always learn from history, to be sure you make the same mistakes again...