Comparison of charge trapping in silicon dioxide and hafnium dioxide at nanoscale