a method for providing stabilization and compression of a bone fracture , the method comprising : providing an intramedullary prosthesis sized for insertion into the intramedullary canal of a bone and having a distal end , a proximal end and a porous structure therebetween , wherein in a first state , the prosthesis is longitudinally expanded and radially contracted , and in a second state , the prosthesis is longitudinally contracted and radially expanded , conforms to the shape of the adjacent bone and exerts forces on the adjacent bone ; and positioning the intramedullary prosthesis within the intramedullary canal of a bone so that the intramedullary prosthesis spans the bone fracture , whereby to provide stabilization and compression of the bone fracture .