Make "gen_square_wave" static, not exported
Add options to hook only to one of read or malloc.

(trying to gear it towards a profiling tool instead of just funny sound generator)