convert size_t to uint32_t and int to int32
use ii instead of i in for loop
remove Sleep() in demo function
convert assert to BX_CHECK