The Mamluks were the dynasty which succeeded the Ayyubids in Egypt in 1250. They seem to be quite a militaristic group of rulers, and ruled over Egypt at the time the Franks were finally expelled from the mainland of the Holy Land (Hillenbrand 1999, 26-29). Ghilman (from the little, questionable stuff I can find on them i.e. wikipedia) seem to be a specific group/unit of soldiers.
Before the time of the Mamluk rulers though, the terms appear to mean the same thing, referring to slave-soldiers. ("Mamluk also translates ghulam, the term with the same significance, used more frequently in the Eastern Islamic world" - from the Introduction to the translation of The Chronicle of Ibn al-Athir, part 1, trans. D.s. Richards)