sampler
fixed malloc / memset in Sampler