This species is found in littoral forests on sandy soils. The plants are small and apparently annual, and probably have sometimes been overlooked by collectors. The distribution information here is provisional because the specimens are on loan and determinations have not been updated.
The African plants of C. longifolia were separated from the other species of Cordylostigma that has been reported from Madagascar, C. virgata, based on having a bearded pubescent corolla throat (Bremekamp, 1952) and also by (Verdcourt, 1976) broader corolla lobes, 1.3-4 mm wide, vs. a glabrous corolla throat and corolla lobes 0.8-1.2 mm wide in C. virgata. However in practice C. longifolia seems to have been distinguished in Madagascar by having an annual habit and stems often weak at the base, somewhat broader leaves, and the flowers few and well separated with the capsules borne on pedicels 5-10 mm long (--20 mm on plants from mainland Africa), vs. at least sometimes a perennial habit with stems mostly erect, leaves narrow and ascending, and flowers several to numerous and mostly in closely-set groups of 3-5 with most of the capsules borne on pedicels less than 5 mm long. The separation of these species is complicated by the fact that many (if not most) of the specimens identified as C. longifolia from both eastern Africa and Madagascar have corollas that are apparently glabrous internally, rather than pubescent or bearded, and the corolla lobes are often similar in width in both groups of specimens. Cordylostigma virgata has been more commonly collected than C. longifolia.
!CMT, V 2011