Fix up BG_Alloc (debug mode): should call memset().