added information about bug of checking memory
added demo - fix buf of checking size of memory(compiler optimization)