To get zebra working, you need add in camera.h this i think
#define CAM_ZEBRA_ASPECT_ADJUST 1
#define CAM_ZEBRA_NOBUF 1
your memory is lower.IX 1000 have 251xxx bytes
maybe you try out to disable in chdk shell compiler options opt_game xxxxx opt_textreader if things go better.if not, then its no mem problem
with that you can get 21 kb more ram.ix 1000 have then 272xxx bytes.
check if enough ram is here is a good idea, but for the check task switching of the Camera need disable(i dont know if thats possible), so no other task can jumo in and allocate memory, because if a task alloc mem, during mem eaten process, mem fragmentation or crash can happen, because the other task get no memory.