[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[MirageOS-devel] Camlp4 Stack_overflow



Hi

I'm trying something that might be a bit silly but it's just intended
as an internal demo of Mirage to my team. I'm writing a tiny HTTP
based application whose only purpose is to allow you to search a phone
book.

I've based my approach on the approach you've used for static websites
using crunch where you compile the web pages into the executable. In
my case that means I take the list of name and number pairs and stuff
them into an array. So part of my config.ml file emits a single Pb.ml
file which contains an array declaration like this:

let db = [|("Aaron Jaksic",1571268);
("Aaron Mcdivitt",1454629);
("Aaron Reuben",1765247);
("Aaron Sardinha",1224806);
("Abbey Gowens",1267083);
("Abbey Hathcox",1309490);
...

As the title say I'm running into problems compiling this when I
create a large phone book, the error being:

Camlp4: Uncaught exception: Stack_overflow

This happens with 25K entries, it works with 10K entries.

Is there some way I can prevent Camlp4 from being run on the Pb.ml
file? Or will I just have to generate a file that builds the array at
runtime somehow?

AndrÃ

_______________________________________________
MirageOS-devel mailing list
MirageOS-devel@xxxxxxxxxxxxxxxxxxxx
http://lists.xenproject.org/cgi-bin/mailman/listinfo/mirageos-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.