simple pthread consumes memory