http://bugs.winehq.org/show_bug.cgi?id=16061
--- Comment #5 from Jon Burgess jburgess777@googlemail.com 2008-11-17 14:49:37 --- The patch fixes the speed problem in both the small example and the original osm2pgsql program. Unfortunately the osm2pgsql program now fails to import the Finnish data set. It runs out of memory trying to allocate 570MB when it already has about 1.2GB allocated:
mmap2(NULL, 570490880, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = -1 ENOMEM (Cannot allocate memory)
Perhaps the upper bound needs to be dropped to something smaller, e.g. 128MB. Or perhaps it could be made intelligent and try backing down the size if the mmap fails?