Preheat oven to 350°F. Grease a 9- x 9-inch baking dish.
Cover potatoes with water in a medium pot and bring to a boil over high heat. Simmer until tender, about 15 minutes.
Drain well and return to the pot. Add margarine, egg, vanilla, and salt. Mash with a fork or potato masher until slightly chunky. Stir in pecans.
Transfer to prepared baking dish and smooth top. Cover with marshmallows and bake at 350°F for 12 to 15 minutes, or until golden brown. Serve immediately.