there is a certain amount of overhead from Codeship, it's around 200-300M. the memory usage also includes all running services inside the build (eg. Postgres, MySQL, etc.)
i think most developer don't optimize their tests for minimal memory usage. we observed that C/C++/Java projects consume a bigger amount of memory during the compilation step.
But how can a build need more than 2GB of memory??