What is the implementation inside buildmesh?

My question is rather simple. I am trying to verify results between FreeFEM and another FEM package. In order to do this, I would need to make a similar enough mesh with gmsh, or similar. What meshing algorithm is used by the 2D mesh generator buildmesh under the hood? Sorry if this is clearly stated in the documentation somewhere and I missed it.